github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/2730/2730.yaml (about)

     1  swagger: "2.0"
     2  info:
     3      contact:
     4          email: example@example.com
     5      description: 'fixture tag named "client"'
     6      license:
     7          name: Apache 2.0
     8          url: http://www.apache.org/licenses/LICENSE-2.0.html
     9      termsOfService: http://swagger.io/terms/
    10      title: Swagger Petstore
    11      version: 1.0.0
    12  basePath: /
    13  tags:
    14      - description: Everything about your Pets
    15        externalDocs:
    16          description: Find out more
    17          url: http://swagger.io
    18        name: pet
    19      - description: Access to Petstore orders
    20        name: client
    21      - description: Operations about user
    22        externalDocs:
    23          description: Find out more about our store
    24          url: http://swagger.io
    25        name: user
    26  paths:
    27      /pet:
    28          post:
    29              consumes:
    30                  - application/json
    31                  - application/xml
    32              operationId: addPet
    33              parameters:
    34                  - description: Pet object that needs to be added to the store
    35                    in: body
    36                    name: body
    37                    required: true
    38                    schema:
    39                      $ref: '#/definitions/Pet'
    40              produces:
    41                  - application/xml
    42                  - application/json
    43              responses:
    44                  "405":
    45                      description: Invalid input
    46              summary: Add a new pet to the store
    47              tags:
    48                  - pet
    49          put:
    50              consumes:
    51                  - application/json
    52                  - application/xml
    53              operationId: updatePet
    54              parameters:
    55                  - description: Pet object that needs to be added to the store
    56                    in: body
    57                    name: body
    58                    required: true
    59                    schema:
    60                      $ref: '#/definitions/Pet'
    61              produces:
    62                  - application/xml
    63                  - application/json
    64              responses:
    65                  "400":
    66                      description: Invalid ID supplied
    67                  "404":
    68                      description: Pet not found
    69                  "405":
    70                      description: Validation exception
    71              summary: Update an existing pet
    72              tags:
    73                  - pet
    74      /pet/findByStatus:
    75          get:
    76              description: Multiple status values can be provided with comma separated strings
    77              operationId: findPetsByStatus
    78              parameters:
    79                  - collectionFormat: multi
    80                    description: Status values that need to be considered for filter
    81                    in: query
    82                    items:
    83                      default: available
    84                      enum:
    85                          - available
    86                          - pending
    87                          - sold
    88                      type: string
    89                    name: status
    90                    required: true
    91                    type: array
    92              produces:
    93                  - application/xml
    94                  - application/json
    95              responses:
    96                  "200":
    97                      description: successful operation
    98                      schema:
    99                          items:
   100                              $ref: '#/definitions/Pet'
   101                          type: array
   102                  "400":
   103                      description: Invalid status value
   104              summary: Finds Pets by status
   105              tags:
   106                  - pet
   107      /pet/findByTags:
   108          get:
   109              deprecated: true
   110              description: Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
   111              operationId: findPetsByTags
   112              parameters:
   113                  - collectionFormat: multi
   114                    description: Tags to filter by
   115                    in: query
   116                    items:
   117                      type: string
   118                    name: tags
   119                    required: true
   120                    type: array
   121              produces:
   122                  - application/xml
   123                  - application/json
   124              responses:
   125                  "200":
   126                      description: successful operation
   127                      schema:
   128                          items:
   129                              $ref: '#/definitions/Pet'
   130                          type: array
   131                  "400":
   132                      description: Invalid tag value
   133              summary: Finds Pets by tags
   134              tags:
   135                  - pet
   136      /pet/{petId}:
   137          delete:
   138              operationId: deletePet
   139              parameters:
   140                  - in: header
   141                    name: api_key
   142                    type: string
   143                  - description: Pet id to delete
   144                    format: int64
   145                    in: path
   146                    name: petId
   147                    required: true
   148                    type: integer
   149              produces:
   150                  - application/xml
   151                  - application/json
   152              responses:
   153                  "400":
   154                      description: Invalid ID supplied
   155                  "404":
   156                      description: Pet not found
   157              summary: Deletes a pet
   158              tags:
   159                  - pet
   160          get:
   161              description: Returns a single pet
   162              operationId: getPetById
   163              parameters:
   164                  - description: ID of pet to return
   165                    format: int64
   166                    in: path
   167                    name: petId
   168                    required: true
   169                    type: integer
   170              produces:
   171                  - application/xml
   172                  - application/json
   173              responses:
   174                  "200":
   175                      description: successful operation
   176                      schema:
   177                          $ref: '#/definitions/Pet'
   178                  "400":
   179                      description: Invalid ID supplied
   180                  "404":
   181                      description: Pet not found
   182              summary: Find pet by ID
   183              tags:
   184                  - pet
   185          post:
   186              consumes:
   187                  - application/x-www-form-urlencoded
   188              operationId: updatePetWithForm
   189              parameters:
   190                  - description: ID of pet that needs to be updated
   191                    format: int64
   192                    in: path
   193                    name: petId
   194                    required: true
   195                    type: integer
   196                  - description: Updated name of the pet
   197                    in: formData
   198                    name: name
   199                    type: string
   200                  - description: Updated status of the pet
   201                    in: formData
   202                    name: status
   203                    type: string
   204              produces:
   205                  - application/xml
   206                  - application/json
   207              responses:
   208                  "405":
   209                      description: Invalid input
   210              summary: Updates a pet in the store with form data
   211              tags:
   212                  - pet
   213      /pet/{petId}/uploadImage:
   214          post:
   215              consumes:
   216                  - multipart/form-data
   217              operationId: uploadFile
   218              parameters:
   219                  - description: ID of pet to update
   220                    format: int64
   221                    in: path
   222                    name: petId
   223                    required: true
   224                    type: integer
   225                  - description: Additional data to pass to server
   226                    in: formData
   227                    name: additionalMetadata
   228                    type: string
   229                  - description: file to upload
   230                    in: formData
   231                    name: file
   232                    type: file
   233              produces:
   234                  - application/json
   235              responses:
   236                  "200":
   237                      description: successful operation
   238                      schema:
   239                          $ref: '#/definitions/ApiResponse'
   240              security:
   241                  - petstore_auth:
   242                      - write:pets
   243                      - read:pets
   244              summary: uploads an image
   245              tags:
   246                  - pet
   247      /store/inventory:
   248          get:
   249              description: Returns a map of status codes to quantities
   250              operationId: getInventory
   251              produces:
   252                  - application/json
   253              responses:
   254                  "200":
   255                      description: successful operation
   256                      schema:
   257                          additionalProperties:
   258                              format: int32
   259                              type: integer
   260                          type: object
   261              summary: Returns pet inventories by status
   262              tags:
   263                  - client
   264      /store/order:
   265          post:
   266              operationId: placeOrder
   267              parameters:
   268                  - description: order placed for purchasing the pet
   269                    in: body
   270                    name: body
   271                    required: true
   272                    schema:
   273                      $ref: '#/definitions/Order'
   274              produces:
   275                  - application/xml
   276                  - application/json
   277              responses:
   278                  "200":
   279                      description: successful operation
   280                      schema:
   281                          $ref: '#/definitions/Order'
   282                  "400":
   283                      description: Invalid Order
   284              summary: Place an order for a pet
   285              tags:
   286                  - client
   287      /store/order/{orderId}:
   288          delete:
   289              description: For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
   290              operationId: deleteOrder
   291              parameters:
   292                  - description: ID of the order that needs to be deleted
   293                    format: int64
   294                    in: path
   295                    minimum: !!float 1
   296                    name: orderId
   297                    required: true
   298                    type: integer
   299              produces:
   300                  - application/xml
   301                  - application/json
   302              responses:
   303                  "400":
   304                      description: Invalid ID supplied
   305                  "404":
   306                      description: Order not found
   307              summary: Delete purchase order by ID
   308              tags:
   309                  - client
   310          get:
   311              description: For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
   312              operationId: getOrderById
   313              parameters:
   314                  - description: ID of pet that needs to be fetched
   315                    format: int64
   316                    in: path
   317                    maximum: !!float 10
   318                    minimum: !!float 1
   319                    name: orderId
   320                    required: true
   321                    type: integer
   322              produces:
   323                  - application/xml
   324                  - application/json
   325              responses:
   326                  "200":
   327                      description: successful operation
   328                      schema:
   329                          $ref: '#/definitions/Order'
   330                  "400":
   331                      description: Invalid ID supplied
   332                  "404":
   333                      description: Order not found
   334              summary: Find purchase order by ID
   335              tags:
   336                  - client
   337      /user:
   338          post:
   339              description: This can only be done by the logged in user.
   340              operationId: createUser
   341              parameters:
   342                  - description: Created user object
   343                    in: body
   344                    name: body
   345                    required: true
   346                    schema:
   347                      $ref: '#/definitions/User'
   348              produces:
   349                  - application/xml
   350                  - application/json
   351              responses:
   352                  default:
   353                      description: successful operation
   354              summary: Create user
   355              tags:
   356                  - user
   357      /user/createWithArray:
   358          post:
   359              operationId: createUsersWithArrayInput
   360              parameters:
   361                  - description: List of user object
   362                    in: body
   363                    name: body
   364                    required: true
   365                    schema:
   366                      items:
   367                          $ref: '#/definitions/User'
   368                      type: array
   369              produces:
   370                  - application/xml
   371                  - application/json
   372              responses:
   373                  default:
   374                      description: successful operation
   375              summary: Creates list of users with given input array
   376              tags:
   377                  - user
   378      /user/createWithList:
   379          post:
   380              operationId: createUsersWithListInput
   381              parameters:
   382                  - description: List of user object
   383                    in: body
   384                    name: body
   385                    required: true
   386                    schema:
   387                      items:
   388                          $ref: '#/definitions/User'
   389                      type: array
   390              produces:
   391                  - application/xml
   392                  - application/json
   393              responses:
   394                  default:
   395                      description: successful operation
   396              summary: Creates list of users with given input array
   397              tags:
   398                  - user
   399      /user/login:
   400          get:
   401              operationId: loginUser
   402              parameters:
   403                  - description: The user name for login
   404                    in: query
   405                    name: username
   406                    required: true
   407                    type: string
   408                  - description: The password for login in clear text
   409                    in: query
   410                    name: password
   411                    required: true
   412                    type: string
   413              produces:
   414                  - application/xml
   415                  - application/json
   416              responses:
   417                  "200":
   418                      description: successful operation
   419                      headers:
   420                          X-Expires-After:
   421                              description: date in UTC when token expires
   422                              format: date-time
   423                              type: string
   424                          X-Rate-Limit:
   425                              description: calls per hour allowed by the user
   426                              format: int32
   427                              type: integer
   428                      schema:
   429                          type: string
   430                  "400":
   431                      description: Invalid username/password supplied
   432              summary: Logs user into the system
   433              tags:
   434                  - user
   435      /user/logout:
   436          get:
   437              operationId: logoutUser
   438              produces:
   439                  - application/xml
   440                  - application/json
   441              responses:
   442                  default:
   443                      description: successful operation
   444              summary: Logs out current logged in user session
   445              tags:
   446                  - user
   447      /user/{username}:
   448          delete:
   449              description: This can only be done by the logged in user.
   450              operationId: deleteUser
   451              parameters:
   452                  - description: The name that needs to be deleted
   453                    in: path
   454                    name: username
   455                    required: true
   456                    type: string
   457              produces:
   458                  - application/xml
   459                  - application/json
   460              responses:
   461                  "400":
   462                      description: Invalid username supplied
   463                  "404":
   464                      description: User not found
   465              summary: Delete user
   466              tags:
   467                  - user
   468          get:
   469              operationId: getUserByName
   470              parameters:
   471                  - description: 'The name that needs to be fetched. Use user1 for testing. '
   472                    in: path
   473                    name: username
   474                    required: true
   475                    type: string
   476              produces:
   477                  - application/xml
   478                  - application/json
   479              responses:
   480                  "200":
   481                      description: successful operation
   482                      schema:
   483                          $ref: '#/definitions/User'
   484                  "400":
   485                      description: Invalid username supplied
   486                  "404":
   487                      description: User not found
   488              summary: Get user by user name
   489              tags:
   490                  - user
   491          put:
   492              description: This can only be done by the logged in user.
   493              operationId: updateUser
   494              parameters:
   495                  - description: name that need to be updated
   496                    in: path
   497                    name: username
   498                    required: true
   499                    type: string
   500                  - description: Updated user object
   501                    in: body
   502                    name: body
   503                    required: true
   504                    schema:
   505                      $ref: '#/definitions/User'
   506              produces:
   507                  - application/xml
   508                  - application/json
   509              responses:
   510                  "400":
   511                      description: Invalid user supplied
   512                  "404":
   513                      description: User not found
   514              summary: Updated user
   515              tags:
   516                  - user
   517  definitions:
   518      ApiResponse:
   519          properties:
   520              code:
   521                  format: int32
   522                  type: integer
   523              message:
   524                  type: string
   525              type:
   526                  type: string
   527          type: object
   528      Category:
   529          properties:
   530              id:
   531                  format: int64
   532                  type: integer
   533              name:
   534                  type: string
   535          type: object
   536          xml:
   537              name: Category
   538      Order:
   539          properties:
   540              complete:
   541                  default: false
   542                  type: boolean
   543              id:
   544                  format: int64
   545                  type: integer
   546              petId:
   547                  format: int64
   548                  type: integer
   549              quantity:
   550                  format: int32
   551                  type: integer
   552              shipDate:
   553                  format: date-time
   554                  type: string
   555              status:
   556                  description: Order Status
   557                  enum:
   558                      - placed
   559                      - approved
   560                      - delivered
   561                  type: string
   562          type: object
   563          xml:
   564              name: Order
   565      Pet:
   566          properties:
   567              category:
   568                  $ref: '#/definitions/Category'
   569              id:
   570                  format: int64
   571                  type: integer
   572              name:
   573                  example: doggie
   574                  type: string
   575              photoUrls:
   576                  items:
   577                      type: string
   578                  type: array
   579                  xml:
   580                      name: photoUrl
   581                      wrapped: true
   582              status:
   583                  description: pet status in the store
   584                  enum:
   585                      - available
   586                      - pending
   587                      - sold
   588                  type: string
   589              tags:
   590                  items:
   591                      $ref: '#/definitions/Tag'
   592                  type: array
   593                  xml:
   594                      name: tag
   595                      wrapped: true
   596          required:
   597              - name
   598              - photoUrls
   599          type: object
   600          xml:
   601              name: Pet
   602      Tag:
   603          properties:
   604              id:
   605                  format: int64
   606                  type: integer
   607              name:
   608                  type: string
   609          type: object
   610          xml:
   611              name: Tag
   612      User:
   613          properties:
   614              email:
   615                  type: string
   616              firstName:
   617                  type: string
   618              id:
   619                  format: int64
   620                  type: integer
   621              lastName:
   622                  type: string
   623              password:
   624                  type: string
   625              phone:
   626                  type: string
   627              userStatus:
   628                  description: User Status
   629                  format: int32
   630                  type: integer
   631              username:
   632                  type: string
   633          type: object
   634          xml:
   635              name: User