Skip to content

Docs: Example importing json schema from file #1054

@LecrisUT

Description

@LecrisUT

It is not obvious how one should be importing a json schema from a local file, e.g.:

--- root
 |-- schema
   |-- schema_root.json
   |-- schema_other.json

where schema_root.json refers to schema_other.json, e.g.:

{
  "$id": "resource:/schema/schema_root.json",
  "$schema": "http://json-schema.org/draft-07/schema",
  "properties": {
    "other": {
      "$ref": "schema_other.json"
    }
}

Is it sufficient to just json.load()? How does it know the BaseRef and if it's loaded as a file or an URL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions