...

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

View as plain text