MCPcopy Create free account
hub / github.com/getkin/kin-openapi / isRootComponentReference

Function isRootComponentReference

openapi3/helpers.go:258–260  ·  view source on GitHub ↗

isSchemaReference takes a $ref value and checks if it references a schema element.

(ref string, compType string)

Source from the content-addressed store, hash-verified

256
257// isSchemaReference takes a $ref value and checks if it references a schema element.
258func isRootComponentReference(ref string, compType string) bool {
259 return isElementReference(ref) && strings.Contains(ref, path.Join("#/components/", compType))
260}
261
262// isWholeDocumentReference takes a $ref value and checks if it is whole document reference.
263func isWholeDocumentReference(ref string) bool {

Callers 1

Calls 1

isElementReferenceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…