...

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

View as plain text