Skip to content

Global defaultResponse/error #3082

Description

@happenslol

Clear and concise description of the problem

It would be great if it was possible to globally define an Error type that all operations (or maybe just all operations within a namespace) use as a default response for OpenAPI.

This would enable defining something like a ServerError type that acts as a fallback, instead of having to use Thing | NotFoundResponse | ServerError for every operation.

I'm not sure what this would look like code-wise, but I can try to come up with some imaginary code examples if you'd like to explain the feature request further.

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design:neededA design request has been raised that needs a proposaltriaged:core

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions