MCPcopy Create free account
hub / github.com/goadesign/goa / nameFromRef

Function nameFromRef

http/codegen/openapi/v3/types_test.go:712–715  ·  view source on GitHub ↗

nameFromRef does the reverse of toRef: it returns the type name from its JSON Schema reference.

(ref string)

Source from the content-addressed store, hash-verified

710// nameFromRef does the reverse of toRef: it returns the type name from its
711// JSON Schema reference.
712func nameFromRef(ref string) string {
713 elems := strings.Split(ref, "/")
714 return elems[len(elems)-1]
715}

Callers 4

matchesSchemaWithPrefixFunction · 0.85
TestMapTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected