JsonSchema.Resolver (json_schema v0.6.0)

Copy Markdown View Source

Module containing functions for resolving types. Main function being the resolve_type function.

Summary

Functions

Resolves a type given its identifier, parent identifier of the resolving subschema, the subschema's enclosing SchemaDefinition and the schema dictionary of the whole set of parsed JSON schema files.

Functions

resolve_type(identifier, parent, schema_def, schema_dict)

Resolves a type given its identifier, parent identifier of the resolving subschema, the subschema's enclosing SchemaDefinition and the schema dictionary of the whole set of parsed JSON schema files.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://example.com/circle.json",
  "title": "Circle",
  "description": "Schema for a circle shape",
  "type": "object",
  "properties": {
    "radius": {
      "type": "number"
    },
    "center": {
      "$ref": "http://example.com/definitions.json#point"
    },
    "color": {
      "$ref": "http://example.com/definitions.json#color"
    }
  },
  "required": ["center", "radius"]
}