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

Function propertiesFromDefs

http/codegen/openapi/json_schema.go:585–596  ·  view source on GitHub ↗

propertiesFromDefs creates a Properties map referencing the given definitions under the given path.

(definitions map[string]*Schema, path string)

Source from the content-addressed store, hash-verified

583// propertiesFromDefs creates a Properties map referencing the given definitions
584// under the given path.
585func propertiesFromDefs(definitions map[string]*Schema, path string) map[string]*Schema {
586 res := make(map[string]*Schema, len(definitions))
587 for n := range definitions {
588 if n == "identity" {
589 continue
590 }
591 s := NewSchema()
592 s.Ref = path + n
593 res[n] = s
594 }
595 return res
596}
597
598// buildResultTypeSchema initializes s as the JSON schema representing mt for the
599// given view.

Callers 1

APISchemaFunction · 0.85

Calls 1

NewSchemaFunction · 0.85

Tested by

no test coverage detected