...

Text file src/github.com/go-openapi/validate/fixtures/validation/default/invalid-default-value-default-response-PatternProperties.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            "schema": {
    31              "type": "object",
    32              "properties": {
    33                "id": {
    34                  "type": "integer",
    35                  "format": "int64"
    36                },
    37                "name": {
    38                  "type": "string"
    39                }
    40              },
    41              "patternProperties": {
    42                ")nb-[.*)": {
    43                  "type": "integer",
    44                  "format": "int64"
    45                }
    46              },
    47              "default": {
    48                "id": 10,
    49                "name": "abc",
    50                "nb-1": 20
    51              }
    52            }
    53          },
    54          "200": {
    55            "description": "Pets list",
    56            "schema": {
    57              "type": "array",
    58              "items": {
    59                "$ref": "#/definitions/Pet"
    60              }
    61            }
    62          }
    63        }
    64      }
    65    }
    66  },
    67  "definitions": {
    68    "Parent": {
    69      "$ref": "#/definitions/Category"
    70    },
    71    "Category": {
    72      "properties": {
    73        "id": {
    74          "type": "integer",
    75          "format": "int64"
    76        },
    77        "name": {
    78          "type": "string"
    79        }
    80      }
    81    },
    82    "Pet": {
    83      "required": [
    84        "name",
    85        "photoUrls"
    86      ],
    87      "properties": {
    88        "id": {
    89          "type": "integer",
    90          "format": "int64"
    91        },
    92        "category": {
    93          "$ref": "#/definitions/Category"
    94        },
    95        "name": {
    96          "type": "string",
    97          "example": "doggie"
    98        },
    99        "photoUrls": {
   100          "type": "array",
   101          "items": {
   102            "type": "string"
   103          }
   104        },
   105        "tags": {
   106          "type": "array",
   107          "items": {
   108            "$ref": "#/definitions/Tag"
   109          }
   110        },
   111        "status": {
   112          "type": "string",
   113          "description": "pet status in the store"
   114        }
   115      }
   116    },
   117    "Tag": {
   118      "properties": {
   119        "id": {
   120          "type": "integer",
   121          "format": "int64"
   122       },
   123        "name": {
   124          "type": "string"
   125        }
   126      },
   127      "patternProperties": {
   128        "nb-.*": {
   129          "type": "integer",
   130          "format": "int64",
   131          "default": 20
   132        }
   133      }
   134    }
   135  }
   136}

View as plain text