github.com/sanposhiho/openapi2proto@v0.0.0-20230521044535-d1080a134e37/fixtures/petstore/swagger.yaml (about)

     1  swagger: "2.0"
     2  info:
     3    version: 1.0.0
     4    title: Swagger Petstore
     5    description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
     6    termsOfService: http://helloreverb.com/terms/
     7    contact:
     8      name: Wordnik API Team
     9      email: foo@example.com
    10      url: http://madskristensen.net
    11    license:
    12      name: MIT
    13      url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
    14  host: petstore.swagger.wordnik.com
    15  basePath: /api
    16  schemes:
    17    - http
    18  consumes:
    19    - application/json
    20  produces:
    21    - application/json
    22  paths:
    23    /pets/{ids}:
    24      get:
    25        description: |
    26          Returns all pets from the system that the user has access to
    27        operationId: findPetsByIds
    28        parameters:
    29          - $ref: '#/parameters/idsParam'
    30          - $ref: 'parameters.yaml#/limitsParam'
    31        responses:
    32          "200":
    33            description: pet response
    34            schema:
    35              $ref: 'Pets.yaml'
    36          default:
    37            description: unexpected error
    38            schema:
    39              $ref: 'Error.yaml'
    40    /pets:
    41      get:
    42        description: |
    43          Returns all pets from the system that the user has access to
    44        operationId: findPets
    45        parameters:
    46          - $ref: 'parameters.yaml#/tagsParam'
    47          - $ref: 'parameters.yaml#/limitsParam'
    48        responses:
    49          "200":
    50            description: pet response
    51            schema:
    52              $ref: 'Pets.yaml'
    53          default:
    54            description: unexpected error
    55            schema:
    56              $ref: 'Error.yaml'
    57      post:
    58        description: Creates a new pet in the store.  Duplicates are allowed
    59        operationId: addPet
    60        parameters:
    61          - name: pet
    62            in: body
    63            description: Pet to add to the store
    64            required: true
    65            schema:
    66              $ref: 'Pet.yaml'
    67        responses:
    68          "200":
    69            description: pet response
    70            schema:
    71              $ref: 'https://raw.githubusercontent.com/NYTimes/openapi2proto/master/fixtures/petstore/Pet.yaml'
    72          default:
    73            description: unexpected error
    74            schema:
    75              $ref: 'Error.yaml'
    76    /pets/{id}:
    77      get:
    78        description: Returns a user based on a single ID, if the user does not have access to the pet
    79        operationId: find pet by id
    80        parameters:
    81          - name: id
    82            in: path
    83            description: ID of pet to fetch
    84            required: true
    85            type: integer
    86            format: int64
    87        responses:
    88          "200":
    89            description: pet response
    90            schema:
    91              $ref: 'Pet.yaml'
    92          default:
    93            description: unexpected error
    94            schema:
    95              $ref: 'Error.yaml'
    96      delete:
    97        description: deletes a single pet based on the ID supplied
    98        operationId: deletePet
    99        parameters:
   100          - name: id
   101            in: path
   102            description: ID of pet to delete
   103            required: true
   104            type: integer
   105            format: int64
   106        responses:
   107          "200":
   108            description: pet deleted
   109          default:
   110            description: unexpected error
   111            schema:
   112              $ref: 'Error.yaml'
   113  
   114  parameters:
   115    idsParam:
   116      name: ids
   117      in: path
   118      description: ids to filter by
   119      required: false
   120      type: array
   121      collectionFormat: csv
   122      items:
   123        type: string
   124