...

Text file src/github.com/go-openapi/validate/fixtures/validation/indirect-circular-ancestor.json

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

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

View as plain text