asyncapi-codegen
asyncapi-codegen copied to clipboard
Fix server security array unmarshaling error
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/
Sorry about the delay, I had some changes in my life this 2 past months, I'll take a look ASAP.