...

Text file src/github.com/go-openapi/validate/fixtures/validation/example/valid-example-schema-items.json

Documentation: github.com/go-openapi/validate/fixtures/validation/example

     1{
     2    "swagger": "2.0",
     3    "info": {
     4        "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n",
     5        "version": "1.0.0",
     6        "title": "Swagger Petstore",
     7        "termsOfService": "http://helloreverb.com/terms/",
     8        "contact": {
     9            "name": "apiteam@wordnik.com"
    10        },
    11        "license": {
    12            "name": "Apache 2.0",
    13            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    14        }
    15    },
    16    "host": "petstore.swagger.wordnik.com",
    17    "basePath": "/v2",
    18    "schemes": [
    19        "http"
    20    ],
    21    "paths": {
    22        "/pets": {
    23          "get": {
    24            "tags": ["pet"],
    25            "summary": "list the pets",
    26            "operationId": "getPets",
    27            "responses": {
    28              "default": {
    29                "description": "Generic Error"
    30              },
    31              "200": {
    32                "description": "Pets list",
    33                "schema": {
    34                  "type": "array",
    35                  "items": {
    36                    "$ref": "#/definitions/Pet"
    37                  }
    38                }
    39              }
    40            }
    41          }
    42        }
    43    },
    44    "definitions": {
    45        "Parent": {
    46          "$ref": "#/definitions/Category"
    47        },
    48        "Category": {
    49            "properties": {
    50                "id": {
    51                    "type": "integer",
    52                    "format": "int64"
    53                },
    54                "name": {
    55                    "type": "string"
    56                }
    57            }
    58        },
    59        "Pet": {
    60            "required": [
    61                "name",
    62                "photoUrls"
    63            ],
    64            "properties": {
    65                "id": {
    66                    "type": "integer",
    67                    "format": "int64"
    68                },
    69                "category": {
    70                    "$ref": "#/definitions/Category"
    71                },
    72                "name": {
    73                    "type": "string",
    74                    "example": "doggie"
    75                },
    76                "photoUrls": {
    77                    "type": "array",
    78                    "items": {
    79                        "type": "string"
    80                    }
    81                },
    82                "tags": {
    83                    "type": "array",
    84                    "items": {
    85                        "$ref": "#/definitions/Tag"
    86                    }
    87                },
    88                "status": {
    89                    "type": "string",
    90                    "description": "pet status in the store"
    91                }
    92            }
    93        },
    94        "Tag": {
    95            "properties": {
    96                "id": {
    97                    "type": "integer",
    98                    "format": "int64"
    99                },
   100                "name": {
   101                    "type": "string"
   102                }
   103            }
   104        }
   105    }
   106}
   107

View as plain text