Skip to content

Fail clearly when the default API key has no name - #363

Merged
nineinchnick merged 1 commit into
mainfrom
api-key-without-name
Oct 24, 2026
Merged

nineinchnick merged 1 commit into
mainfrom
api-key-without-name

Conversation

@nineinchnick

Copy link
Copy Markdown
Owner

With authentication.type=api_key, the default security scheme has no name, so without authentication.api-key-name the name lookup threw a NullPointerException (defaultObj), instead of the INVALID_CATALOG_PROPERTY error saying which property to set.

The issue also mentions apiKey schemes in the spec without a name, but those can't reach this code: the parser rejects them when the spec loads, with OPENAPI_INVALID_SPEC.

Fixes #360

With authentication.type=api_key, the default security scheme has no
name, so without authentication.api-key-name the name lookup threw a
NullPointerException, instead of the error saying which property to
set. Specs can't trigger this, because the parser rejects apiKey
schemes without a name.
@nineinchnick
nineinchnick merged commit a6612f3 into main Oct 24, 2026
1 check passed
@nineinchnick
nineinchnick deleted the api-key-without-name branch October 24, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail clearly when an API key scheme has no name

1 participant