schematic 0.19.7

A layered serde configuration and schema library.
Documentation
---
source: crates/schematic/tests/extends_test.rs
expression: "std::fs::read_to_string(file).unwrap()"
---
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ExtendsEnum",
  "type": "object",
  "required": [
    "extends",
    "value"
  ],
  "properties": {
    "extends": {
      "allOf": [
        {
          "$ref": "#/definitions/ExtendsFrom"
        }
      ]
    },
    "value": {
      "type": "array",
      "items": {
        "type": "number"
      }
    }
  },
  "additionalProperties": false,
  "definitions": {
    "ExtendsFrom": {
      "title": "ExtendsFrom",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "ExtendsList": {
      "title": "ExtendsList",
      "type": "object",
      "required": [
        "extends",
        "value"
      ],
      "properties": {
        "extends": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "value": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtendsString": {
      "title": "ExtendsString",
      "type": "object",
      "required": [
        "extends",
        "value"
      ],
      "properties": {
        "extends": {
          "type": "string"
        },
        "value": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtendsStringOptional": {
      "title": "ExtendsStringOptional",
      "type": "object",
      "required": [
        "extends",
        "value"
      ],
      "properties": {
        "extends": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    }
  }
}