github.com/cbroglie/openapi2proto@v0.0.0-20171004221549-76b8501da882/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:
    24      get:
    25        description: |
    26          Returns all pets from the system that the user has access to
    27        operationId: findPets
    28        parameters:
    29          - $ref: 'parameters.yaml#/tagsParam'
    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      post:
    41        description: Creates a new pet in the store.  Duplicates are allowed
    42        operationId: addPet
    43        parameters:
    44          - name: pet
    45            in: body
    46            description: Pet to add to the store
    47            required: true
    48            schema:
    49              $ref: 'Pet.yaml'
    50        responses:
    51          "200":
    52            description: pet response
    53            schema:
    54              $ref: 'https://raw.githubusercontent.com/NYTimes/openapi2proto/master/fixtures/petstore/Pet.yaml'
    55          default:
    56            description: unexpected error
    57            schema:
    58              $ref: 'Error.yaml'
    59    /pets/{id}:
    60      get:
    61        description: Returns a user based on a single ID, if the user does not have access to the pet
    62        operationId: find pet by id
    63        parameters:
    64          - name: id
    65            in: path
    66            description: ID of pet to fetch
    67            required: true
    68            type: integer
    69            format: int64
    70        responses:
    71          "200":
    72            description: pet response
    73            schema:
    74              $ref: 'Pet.yaml'
    75          default:
    76            description: unexpected error
    77            schema:
    78              $ref: 'Error.yaml'
    79      delete:
    80        description: deletes a single pet based on the ID supplied
    81        operationId: deletePet
    82        parameters:
    83          - name: id
    84            in: path
    85            description: ID of pet to delete
    86            required: true
    87            type: integer
    88            format: int64
    89        responses:
    90          "200":
    91            description: pet deleted
    92          default:
    93            description: unexpected error
    94            schema:
    95              $ref: 'Error.yaml'