Skip to content

Bug: Autogenerated OpenAPI titles don't handle acronyms well #4004

Open
@umarbutler

Description

Description

class InvalidAPIKeyError(NotAuthorizedException):
    detail = "Invalid API key"
    extra = "The API key you provided is invalid, incorrect, expired, has been revoked, or your account is overdue."

The title of this exception gets turned into "Invalid A P I Key Error" in my autogenerated OpenAPI spec and unfortunately as mentioned in #4002, its not yet possible to customize the title either. Best solution is to use InvalidApiKeyError.

URL to code causing the issue

No response

MCVE

# Your MCVE code here

Steps to reproduce

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"

Logs

Litestar Version

2.14.0

Platform

  • Linux
  • Mac
  • Windows
  • Other (Please specify in the description above)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛This is something that is not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions