...

Text file src/github.com/go-openapi/validate/fixtures/validation/default/valid-default-value-header-badpattern.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                "headers": {
    30                  "X-Rate-Limit": {
    31                    "type": "string",
    32                    "pattern": "^[a-z]+$",
    33                    "default": "abc"
    34                  }
    35                },
    36                "description": "Generic Error"
    37              },
    38              "200": {
    39                "description": "Pets list",
    40                "schema": {
    41                  "type": "array",
    42                  "items": {
    43                    "$ref": "#/definitions/Pet"
    44                  }
    45                }
    46              }
    47            }
    48          }
    49        }
    50    },
    51    "definitions": {
    52        "Parent": {
    53          "$ref": "#/definitions/Category"
    54        },
    55        "Category": {
    56            "properties": {
    57                "id": {
    58                    "type": "integer",
    59                    "format": "int64"
    60                },
    61                "name": {
    62                    "type": "string"
    63                }
    64            }
    65        },
    66        "Pet": {
    67            "required": [
    68                "name",
    69                "photoUrls"
    70            ],
    71            "properties": {
    72                "id": {
    73                    "type": "integer",
    74                    "format": "int64"
    75                },
    76                "category": {
    77                    "$ref": "#/definitions/Category"
    78                },
    79                "name": {
    80                    "type": "string",
    81                    "example": "doggie"
    82                },
    83                "photoUrls": {
    84                    "type": "array",
    85                    "items": {
    86                        "type": "string"
    87                    }
    88                },
    89                "tags": {
    90                    "type": "array",
    91                    "items": {
    92                        "$ref": "#/definitions/Tag"
    93                    }
    94                },
    95                "status": {
    96                    "type": "string",
    97                    "description": "pet status in the store"
    98                }
    99            }
   100        },
   101        "Tag": {
   102            "properties": {
   103                "id": {
   104                    "type": "integer",
   105                    "format": "int64"
   106                },
   107                "name": {
   108                    "type": "string"
   109                }
   110            }
   111        }
   112    }
   113}
   114

View as plain text