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

Function NewSchema

http/codegen/openapi/json_schema.go:116–122  ·  view source on GitHub ↗

NewSchema instantiates a new JSON schema.

()

Source from the content-addressed store, hash-verified

114
115// NewSchema instantiates a new JSON schema.
116func NewSchema() *Schema {
117 js := Schema{
118 Properties: make(map[string]*Schema),
119 Defs: make(map[string]*Schema),
120 }
121 return &js
122}
123
124// JSON serializes the schema into JSON. It makes sure the "$schema" standard
125// field is set if needed prior to delegating to the standard JSON marshaler.

Callers 7

responseSpecFromExprFunction · 0.92
schemafyMethod · 0.92
TypeSchemaWithPrefixFunction · 0.85
propertiesFromDefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected