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

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