MCPcopy Create free account
hub / github.com/go-openapi/spec / JSONSchemaDraft04

Function JSONSchemaDraft04

spec.go:32–43  ·  view source on GitHub ↗

JSONSchemaDraft04 loads the json schema document for json schema draft04.

()

Source from the content-addressed store, hash-verified

30
31// JSONSchemaDraft04 loads the json schema document for json schema draft04.
32func JSONSchemaDraft04() (*Schema, error) {
33 b, err := jsonschemaDraft04JSONBytes()
34 if err != nil {
35 return nil, err
36 }
37
38 schema := new(Schema)
39 if err := json.Unmarshal(b, schema); err != nil {
40 return nil, err
41 }
42 return schema, nil
43}
44
45// MustLoadSwagger20Schema panics when Swagger20Schema returns an error.
46func MustLoadSwagger20Schema() *Schema {

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…