MCPcopy Create free account
hub / github.com/a-h/rest / normalizeTypeName

Method normalizeTypeName

schema.go:439–451  ·  view source on GitHub ↗
(pkgPath, name string)

Source from the content-addressed store, hash-verified

437 "]", "_")
438
439func (api *API) normalizeTypeName(pkgPath, name string) string {
440 var omitPackage bool
441 for _, pkg := range api.StripPkgPaths {
442 if strings.HasPrefix(pkgPath, pkg) {
443 omitPackage = true
444 break
445 }
446 }
447 if omitPackage || pkgPath == "" {
448 return normalizer.Replace(name)
449 }
450 return normalizer.Replace(pkgPath + "/" + name)
451}

Callers 1

getModelNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected