Skip to content

Conversation

@lmendes86
Copy link

Fixes #294

The AsyncAPI v3.0 specification defines servers[].security as an array, but the Server struct incorrectly used *SecurityScheme instead of []*SecurityScheme, causing JSON unmarshaling errors when parsing specs with server security definitions.

Changes:

  • Updated Server.Security field to []*SecurityScheme
  • Updated generateMetadata() to iterate over security array
  • Updated setDependencies() to iterate over security array
  • Added test case in test/v3/issues/294/

Fixes lerenn#294

The AsyncAPI v3.0 specification defines servers[].security as an
array, but the Server struct incorrectly used *SecurityScheme
instead of []*SecurityScheme, causing JSON unmarshaling errors
when parsing specs with server security definitions.

Changes:
- Updated Server.Security field to []*SecurityScheme
- Updated generateMetadata() to iterate over security array
- Updated setDependencies() to iterate over security array
- Added test case in test/v3/issues/294/
@lerenn
Copy link
Owner

lerenn commented Oct 27, 2025

Sorry about the delay, I had some changes in my life this 2 past months, I'll take a look ASAP.

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.

[BUG] AsyncAPI v3.0: Cannot parse servers.security as array

2 participants