...

Text file src/github.com/go-openapi/validate/fixtures/validation/example/invalid-example-response-ref.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            "$ref": "#/responses/petListResponse"
    33          }
    34        }
    35      }
    36    }
    37  },
    38  "responses": {
    39    "petListResponse": {
    40      "description": "Pets list",
    41      "schema": {
    42        "type": "array",
    43        "items": {
    44          "$ref": "#/definitions/Pet"
    45        }
    46      },
    47      "examples": {
    48        "application/json": [{
    49          "id": 123,
    50          "photoUrls": [
    51            "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png"
    52          ]
    53        }]
    54      }
    55    }
    56  },
    57  "definitions": {
    58    "Parent": {
    59      "$ref": "#/definitions/Category"
    60    },
    61    "Category": {
    62      "properties": {
    63        "id": {
    64          "type": "integer",
    65          "format": "int64"
    66        },
    67        "name": {
    68          "type": "string"
    69        }
    70      }
    71    },
    72    "Pet": {
    73      "required": [
    74        "name",
    75        "photoUrls"
    76      ],
    77      "properties": {
    78        "id": {
    79          "type": "integer",
    80          "format": "int64"
    81        },
    82        "category": {
    83          "$ref": "#/definitions/Category"
    84        },
    85        "name": {
    86          "type": "string",
    87          "example": "doggie"
    88        },
    89        "photoUrls": {
    90          "type": "array",
    91          "items": {
    92            "type": "string"
    93          }
    94        },
    95        "tags": {
    96          "type": "array",
    97          "items": {
    98            "$ref": "#/definitions/Tag"
    99          }
   100        },
   101        "status": {
   102          "type": "string",
   103          "description": "pet status in the store"
   104        }
   105      }
   106    },
   107    "Tag": {
   108      "properties": {
   109        "id": {
   110          "type": "integer",
   111          "format": "int64"
   112        },
   113        "name": {
   114          "type": "string"
   115        }
   116      }
   117    }
   118  }
   119}

View as plain text