github.com/alecthomas/jsonschema@v0.0.0-20220216202328-9eeeec9d044b/fixtures/go_comments.json (about)

     1  {
     2    "$schema": "http://json-schema.org/draft-04/schema#",
     3    "$ref": "#/definitions/User",
     4    "definitions": {
     5      "Pet": {
     6        "required": [
     7          "name"
     8        ],
     9        "properties": {
    10          "name": {
    11            "type": "string",
    12            "title": "Name",
    13            "description": "Name of the animal."
    14          }
    15        },
    16        "additionalProperties": false,
    17        "type": "object",
    18        "description": "Pet defines the user's fury friend."
    19      },
    20      "Plant": {
    21        "required": [
    22          "variant"
    23        ],
    24        "properties": {
    25          "variant": {
    26            "type": "string",
    27            "title": "Variant"
    28          }
    29        },
    30        "additionalProperties": false,
    31        "type": "object",
    32        "description": "Plant represents the plants the user might have and serves as a test of structs inside a `type` set."
    33      },
    34      "User": {
    35        "required": [
    36          "id",
    37          "name",
    38          "pets",
    39          "plants"
    40        ],
    41        "properties": {
    42          "id": {
    43            "type": "integer",
    44            "description": "Unique sequential identifier."
    45          },
    46          "name": {
    47            "maxLength": 20,
    48            "minLength": 1,
    49            "pattern": ".*",
    50            "type": "string",
    51            "title": "the name",
    52            "description": "this is a property",
    53            "default": "alex",
    54            "examples": [
    55              "joe",
    56              "lucy"
    57            ]
    58          },
    59          "friends": {
    60            "items": {
    61              "type": "integer"
    62            },
    63            "type": "array",
    64            "description": "list of IDs, omitted when empty"
    65          },
    66          "tags": {
    67            "patternProperties": {
    68              ".*": {
    69                "additionalProperties": true
    70              }
    71            },
    72            "type": "object"
    73          },
    74          "pets": {
    75            "items": {
    76              "$schema": "http://json-schema.org/draft-04/schema#",
    77              "$ref": "#/definitions/Pet"
    78            },
    79            "type": "array",
    80            "description": "An array of pets the user cares for."
    81          },
    82          "plants": {
    83            "items": {
    84              "$schema": "http://json-schema.org/draft-04/schema#",
    85              "$ref": "#/definitions/Plant"
    86            },
    87            "type": "array",
    88            "title": "Pants",
    89            "description": "Set of plants that the user likes"
    90          }
    91        },
    92        "additionalProperties": false,
    93        "type": "object",
    94        "description": "User is used as a base to provide tests for comments."
    95      }
    96    }
    97  }