...

Text file src/github.com/go-openapi/validate/fixtures/validation/default/invalid-default-value-response-ref.json

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

     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      "default": [
    47	  {
    48            "id": 123,
    49            "photoUrls": [
    50              "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png"
    51            ]
    52          },
    53	  {
    54            "id": 456,
    55            "photoUrls": [
    56              "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png"
    57            ]
    58          }
    59      ]
    60    }
    61      }
    62  },
    63  "definitions": {
    64    "Parent": {
    65      "$ref": "#/definitions/Category"
    66    },
    67    "Category": {
    68      "properties": {
    69        "id": {
    70          "type": "integer",
    71          "format": "int64"
    72        },
    73        "name": {
    74          "type": "string"
    75        }
    76      }
    77    },
    78    "Pet": {
    79      "required": [
    80        "name",
    81        "photoUrls"
    82      ],
    83      "properties": {
    84        "id": {
    85          "type": "integer",
    86          "format": "int64"
    87        },
    88        "category": {
    89          "$ref": "#/definitions/Category"
    90        },
    91        "name": {
    92          "type": "string",
    93          "example": "doggie"
    94        },
    95        "photoUrls": {
    96          "type": "array",
    97          "items": {
    98            "type": "string"
    99          }
   100        },
   101        "tags": {
   102          "type": "array",
   103          "items": {
   104            "$ref": "#/definitions/Tag"
   105          }
   106        },
   107        "status": {
   108          "type": "string",
   109          "description": "pet status in the store"
   110        }
   111      }
   112    },
   113    "Tag": {
   114      "properties": {
   115        "id": {
   116          "type": "integer",
   117          "format": "int64"
   118        },
   119        "name": {
   120          "type": "string"
   121        }
   122      }
   123    }
   124  }
   125}

View as plain text