...

Text file src/github.com/go-openapi/spec/fixtures/expansion/overflow.json

Documentation: github.com/go-openapi/spec/fixtures/expansion

     1{
     2    "swagger": "2.0",
     3    "info": {
     4        "title": "Swagger Sample",
     5        "description": "Sample API Playground.",
     6        "version": "1.0.0"
     7    },
     8    "basePath": "/v1",
     9    "schemes": [
    10        "http"
    11    ],
    12    "consumes": [
    13        "application/vdn.sample.v1+json"
    14    ],
    15    "produces": [
    16        "application/vdn.sample.v1+json"
    17    ],
    18    "paths": {
    19        "/books": {
    20            "get": {
    21                "summary": "List all books",
    22                "operationId": "listBooks",
    23                "tags": [
    24                    "books"
    25                ],
    26                "responses": {
    27                    "200": {
    28                        "headers": {
    29                            "Link": {
    30                                "type": "string"
    31                            }
    32                        },
    33                        "description": "An array of books",
    34                        "schema": {
    35                            "type": "array",
    36                            "items": {
    37                                "$ref": "#/definitions/Book"
    38                            }
    39                        }
    40                    },
    41                    "default": {
    42                        "description": "generic error response",
    43                        "schema": {
    44                            "$ref": "#/definitions/Error"
    45                        }
    46                    }
    47                }
    48            }
    49        }
    50    },
    51    "definitions": {
    52        "Store": {
    53            "type": "object",
    54            "properties": {
    55                "title": {
    56                    "type": "string",
    57                    "example": "Book Shop"
    58                },
    59                "categories": {
    60                    "type": "array",
    61                    "items": {
    62                        "$ref": "#/definitions/Category"
    63                    }
    64                }
    65            }
    66        },
    67        "Category": {
    68            "type": "object",
    69            "properties": {
    70                "title": {
    71                    "type": "string",
    72                    "example": "Drama"
    73                },
    74                "books": {
    75                    "type": "array",
    76                    "items": {
    77                        "$ref": "#/definitions/Book"
    78                    }
    79                }
    80            }
    81        },
    82        "Book": {
    83            "type": "object",
    84            "required": [
    85                "title",
    86                "summary"
    87            ],
    88            "properties": {
    89                "title": {
    90                    "type": "string",
    91                    "example": "Winnie the Pooh"
    92                },
    93                "summary": {
    94                    "type": "string",
    95                    "example": "Famous children's book"
    96                },
    97                "related_books": {
    98                    "type": "array",
    99                    "items": {
   100                        "$ref": "#/definitions/Book"
   101                    }
   102                }
   103            }
   104        },
   105        "Error": {
   106            "type": "object",
   107            "readOnly": true,
   108            "properties": {
   109                "code": {
   110                    "type": "integer",
   111                    "format": "int64",
   112                    "example": 400
   113                },
   114                "message": {
   115                    "type": "string",
   116                    "example": "Unexpected error"
   117                }
   118            },
   119            "required": [
   120                "message"
   121            ]
   122        }
   123    }
   124}

View as plain text