Skip to content

404 Status Code not Docummented #103

Closed
@awtkns

Description

@awtkns

Discussed in #102

Originally posted by sondrelg September 16, 2021
Hi!

I was just testing out schemathesis on a new project implementing crudrouter, and found it complaining about the fact that one of my generated endpoints had undocumented response codes.

Output:

DELETE /api/v1/authors/{item_id} [P]
1. Received a response with a status code, which is not defined in the schema: 404

Declared status codes: 200, 422

This error is technically correct - there is no 404 documented, but I can definitely understand how crudrouter as a library might not want to auto-document every possible status code, since it would make the schema way too detailed/verbose.

I was just wondering, is it possible to opt-into documenting extra status codes? Or is it possible to manually extend the status codes documented?

If this feature doesn't exist yet, do you think it would be something worth implementing? If nothing else it would be cool to be able to switch it on just for testing.

The aim of this feature is to document 404 status codes in the openapi spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions