Skip to content

Multiple operations return values that are not described correctly by the OpenAPI document #112

Open
@nielthiart

Description

@nielthiart

Delete pet operation returns 200 response

Delete pet operation returns 200 response, but the spec only describes a 400 for invalid ID.

Example:

curl -X 'DELETE' \
  'https://petstore3.swagger.io/api/v3/pet/10' \
  -H 'accept: */*' \
  -H 'api_key: qqqq'

Returns:

< HTTP/2 200
< date: Fri, 22 Dec 2023 12:30:11 GMT
< content-type: application/json
< content-length: 11
< access-control-allow-origin: *
< access-control-allow-methods: GET, POST, DELETE, PUT
< access-control-allow-headers: Content-Type, api_key, Authorization
< access-control-expose-headers: Content-Disposition
< server: Jetty(9.4.9.v20180320)
<
* Connection #0 to host petstore3.swagger.io left intact
Pet deleted%

CleanShot 2023-12-22 at 14 22 07@2x

This is addressed in #109

Update pet with form returns a 200 response with a Pet object

The Pet object returned by updatePetWithForm is not described in the spec.

Example:

curl -X 'POST' --verbose \
  'https://petstore3.swagger.io/api/v3/pet/10?name=lizard&status=available' \
  -H 'accept: */*' \
  -d ''

Response:

< HTTP/2 200
< date: Fri, 22 Dec 2023 12:31:22 GMT
< content-type: application/json
< content-length: 137
< access-control-allow-origin: *
< access-control-allow-methods: GET, POST, DELETE, PUT
< access-control-allow-headers: Content-Type, api_key, Authorization
< access-control-expose-headers: Content-Disposition
< server: Jetty(9.4.9.v20180320)
<
* Connection #0 to host petstore3.swagger.io left intact
{"id":10,"category":{"id":1,"name":"Dogs"},"name":"lizard","photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}%

CleanShot 2023-12-22 at 14 25 00@2x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions