schemars 0.6.0-alpha

Generate JSON Schemas from Rust code
Documentation
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Internal",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "typeProperty"
      ],
      "properties": {
        "typeProperty": {
          "type": "string",
          "enum": [
            "UnitOne"
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "typeProperty"
      ],
      "properties": {
        "typeProperty": {
          "type": "string",
          "enum": [
            "StringMap"
          ]
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    {
      "type": "object",
      "required": [
        "typeProperty"
      ],
      "properties": {
        "typeProperty": {
          "type": "string",
          "enum": [
            "UnitStructNewType"
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "bar",
        "foo",
        "typeProperty"
      ],
      "properties": {
        "bar": {
          "type": "boolean"
        },
        "foo": {
          "type": "integer",
          "format": "int32"
        },
        "typeProperty": {
          "type": "string",
          "enum": [
            "StructNewType"
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "bar",
        "foo",
        "typeProperty"
      ],
      "properties": {
        "bar": {
          "type": "boolean"
        },
        "foo": {
          "type": "integer",
          "format": "int32"
        },
        "typeProperty": {
          "type": "string",
          "enum": [
            "Struct"
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "typeProperty"
      ],
      "properties": {
        "typeProperty": {
          "type": "string",
          "enum": [
            "UnitTwo"
          ]
        }
      }
    }
  ]
}