propertiesFromDefs creates a Properties map referencing the given definitions under the given path.
(definitions map[string]*Schema, path string)
| 583 | // propertiesFromDefs creates a Properties map referencing the given definitions |
| 584 | // under the given path. |
| 585 | func 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. |