MCPcopy Create free account
hub / github.com/cli/cli / refName

Function refName

script/ghmock/schemacmd.go:508–513  ·  view source on GitHub ↗

refName is the last part of a schema's $ref, such as simple-user.

(ref *openapi3.SchemaRef)

Source from the content-addressed store, hash-verified

506
507// refName is the last part of a schema's $ref, such as simple-user.
508func refName(ref *openapi3.SchemaRef) string {
509 if i := strings.LastIndex(ref.Ref, "/"); i >= 0 {
510 return ref.Ref[i+1:]
511 }
512 return ref.Ref
513}
514
515// writeProperties lists an object's properties, or those of each item in a
516// list of objects, with the ones a response must include first.

Callers 2

schemaTypeNameFunction · 0.85
discriminatorValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected