github.com/josephspurrier/go-swagger@v0.2.1-0.20221129144919-1f672a142a00/fixtures/goparsing/spec/api_spec.json (about)

     1  {
     2    "consumes":[
     3      "application/json"
     4    ],
     5    "produces":[
     6      "application/json"
     7    ],
     8    "schemes":[
     9      "https"
    10    ],
    11    "swagger":"2.0",
    12    "info":{
    13      "description":"the purpose of this application is to provide an application\nthat is using plain go code to define an API",
    14      "title":"API.",
    15      "version":"0.0.1"
    16    },
    17    "host":"localhost",
    18    "paths":{
    19      "/admin/bookings/":{
    20        "get":{
    21          "consumes":[
    22            "application/json"
    23          ],
    24          "produces":[
    25            "application/json"
    26          ],
    27          "schemes":[
    28            "http",
    29            "https"
    30          ],
    31          "tags":[
    32            "booking"
    33          ],
    34          "summary":"Bookings lists all the appointments that have been made on the site.",
    35          "operationId":"Bookings",
    36          "responses":{
    37            "200":{
    38              "$ref":"#/responses/BookingResponse"
    39            }
    40          }
    41        }
    42      }
    43    },
    44    "definitions":{
    45      "Booking":{
    46        "description":"A Booking in the system",
    47        "type":"object",
    48        "required":[
    49          "id",
    50          "Subject"
    51        ],
    52        "properties":{
    53          "Subject":{
    54            "description":"Subject the subject of this booking",
    55            "type":"string"
    56          },
    57          "id":{
    58            "description":"ID the id of the booking",
    59            "type":"integer",
    60            "format":"int64",
    61            "x-go-name":"ID",
    62            "readOnly":true
    63          }
    64        },
    65        "x-go-package":"github.com/go-swagger/go-swagger/vendor/github.com/go-swagger/scan-repo-boundary/makeplans"
    66      },
    67      "Customer":{
    68        "type":"object",
    69        "title":"Customer of the site.",
    70        "properties":{
    71          "name":{
    72            "type":"string",
    73            "x-go-name":"Name"
    74          }
    75        },
    76        "x-go-package":"github.com/go-swagger/go-swagger/fixtures/goparsing/spec"
    77      },
    78      "DateRange":{
    79        "description":"DateRange represents a scheduled appointments time\nDateRange should be in definitions since it's being used in a response",
    80        "type":"object",
    81        "properties":{
    82          "end":{
    83            "type":"string",
    84            "x-go-name":"End"
    85          },
    86          "start":{
    87            "type":"string",
    88            "x-go-name":"Start"
    89          }
    90        },
    91        "x-go-package":"github.com/go-swagger/go-swagger/fixtures/goparsing/spec"
    92      }
    93    },
    94    "responses":{
    95      "BookingResponse":{
    96        "description":"BookingResponse represents a scheduled appointment",
    97        "schema":{
    98          "type":"object",
    99          "properties":{
   100            "booking":{
   101              "$ref":"#/definitions/Booking"
   102            },
   103            "customer":{
   104              "$ref":"#/definitions/Customer"
   105            },
   106            "dates":{
   107              "$ref":"#/definitions/DateRange"
   108            },
   109            "map": {
   110              "type": "object",
   111              "additionalProperties": {
   112                "type": "string"
   113              },
   114              "example": {"key": "value"},
   115              "x-go-name": "Map"
   116            },
   117            "slice": {
   118              "type": "array",
   119              "items": {
   120                "type": "integer",
   121                "format": "int64"
   122              },
   123              "x-go-name": "Slice",
   124              "example": [
   125                1,
   126                2
   127              ]
   128            }
   129          }
   130        }
   131      }
   132    }
   133  }