schematic 0.19.7

A layered serde configuration and schema library.
Documentation
---
source: crates/schematic/tests/settings_test.rs
expression: "std::fs::read_to_string(file).unwrap()"
---
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "NestedMapSettings",
  "type": "object",
  "required": [
    "nestedOpt",
    "nestedReq"
  ],
  "properties": {
    "nestedOpt": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/StandardSettings"
          },
          "propertyNames": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "nestedReq": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/StandardSettings"
      },
      "propertyNames": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false,
  "definitions": {
    "NestedSettings": {
      "title": "NestedSettings",
      "type": "object",
      "required": [
        "nestedOpt",
        "nestedReq"
      ],
      "properties": {
        "nestedOpt": {
          "anyOf": [
            {
              "$ref": "#/definitions/StandardSettings"
            },
            {
              "type": "null"
            }
          ]
        },
        "nestedReq": {
          "allOf": [
            {
              "$ref": "#/definitions/StandardSettings"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "NestedVecSettings": {
      "title": "NestedVecSettings",
      "type": "object",
      "required": [
        "nestedOpt",
        "nestedReq"
      ],
      "properties": {
        "nestedOpt": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/StandardSettings"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "nestedReq": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/StandardSettings"
          }
        }
      },
      "additionalProperties": false
    },
    "StandardSettings": {
      "title": "StandardSettings",
      "type": "object",
      "required": [
        "opt",
        "req"
      ],
      "properties": {
        "opt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "req": {
          "type": "string"
        },
        "reqDefault": {
          "default": "abc",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}