MCPcopy Create free account
hub / github.com/docker/docker-agent / schemaType

Function schemaType

pkg/tools/builtin/openapi/openapi.go:391–397  ·  view source on GitHub ↗

schemaType returns the JSON Schema type string for an OpenAPI schema. Defaults to "string" when the type is unspecified.

(s *base.Schema)

Source from the content-addressed store, hash-verified

389// schemaType returns the JSON Schema type string for an OpenAPI schema.
390// Defaults to "string" when the type is unspecified.
391func schemaType(s *base.Schema) string {
392 if len(s.Type) > 0 {
393 return s.Type[0]
394 }
395
396 return "string"
397}
398
399// yamlNodeToValue converts a yaml.Node to a native Go value, preserving the
400// original type (int, float, bool, null) instead of returning everything as a

Callers 1

schemaProxyToPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected