code: func BasePath(val string) {
  	switch def := dslengine.CurrentDefinition().(type) {
  	case *design.APIDefinition:
  		def.BasePath = val
  	case *design.ResourceDefinition:
  		def.BasePath = val
  		if !strings.HasPrefix(val, "//") {
  			awcs := design.ExtractWildcards(design.Design.BasePath)
  			wcs := design.ExtractWildcards(val)
  			for _, awc := range awcs {
  				for _, wc := range wcs {
  					if awc == wc {
  						dslengine.ReportError(`duplicate wildcard "%s" in API and resource base paths`, wc)
  					}
  				}
  			}
  		}
  	default:
  		dslengine.IncompatibleDSL()
  	}
  }
docs: // BasePath can used in: API, Resource
  //
  // BasePath defines the API base path, i.e. the common path prefix to all the API actions.
  // The path may define wildcards (see Routing for a description of the wildcard syntax).
  // The corresponding parameters must be described using Params.