schemars 0.6.0-alpha

Generate JSON Schemas from Rust code
Documentation
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "OsStrings",
  "type": "object",
  "required": [
    "borrowed",
    "owned"
  ],
  "properties": {
    "borrowed": {
      "$ref": "#/definitions/OsString"
    },
    "owned": {
      "$ref": "#/definitions/OsString"
    }
  },
  "definitions": {
    "OsString": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "Unix"
          ],
          "properties": {
            "Unix": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "uint8",
                "minimum": 0.0
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "Windows"
          ],
          "properties": {
            "Windows": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "uint16",
                "minimum": 0.0
              }
            }
          }
        }
      ]
    }
  }
}