asyncapi-codegen icon indicating copy to clipboard operation
asyncapi-codegen copied to clipboard

Fix server security array unmarshaling error

Open lmendes86 opened this issue 3 months ago • 1 comments

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/

lmendes86 avatar Oct 01 '25 13:10 lmendes86

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

lerenn avatar Oct 27 '25 09:10 lerenn