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

Method getTypeFieldComment

schema.go:414–422  ·  view source on GitHub ↗
(pkg string, name string, field string)

Source from the content-addressed store, hash-verified

412}
413
414func (api *API) getTypeFieldComment(pkg string, name string, field string) (comment string, deprecated bool, err error) {
415 pkgComments, err := api.getCommentsForPackage(pkg)
416 if err != nil {
417 return
418 }
419 comment = pkgComments[pkg+"."+name+"."+field]
420 deprecated = isMarkedAsDeprecated(comment)
421 return
422}
423
424func shouldBeReferenced(schema *openapi3.Schema) bool {
425 if schema.Type.Is(openapi3.TypeObject) && schema.AdditionalProperties.Schema == nil {

Callers 1

RegisterModelMethod · 0.95

Calls 2

getCommentsForPackageMethod · 0.95
isMarkedAsDeprecatedFunction · 0.85

Tested by

no test coverage detected