Conversation
|
|
|
Welcome @Harsh-128! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Harsh-128 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Just following up on this PR when you get a chance. The fix addresses missing list markers for named slice types and includes a regression test. Happy to make any changes based on review feedback. Thanks! |
|
Quick update: I’ve rechecked the changes and the regression test for named slice types. The PR is ready for review, and I’m happy to address any feedback. Thanks! |
What happened
List markers on named slice types were not being picked up when the type was used as a struct field.
For example, when a field uses a named slice type:
type NamedItemList []string
with markers such as:
// +listType=map
// +listMapKey=port
the generated OpenAPI schema did not include the corresponding list extensions.
What changed
The generator now also checks the comments on the alias type when generating member extensions.
A regression test was added to
TestExtensionscovering a named slice type with+listType=mapand+listMapKey=port.Testing
go test ./pkg/generators -run TestExtensions -count=1go test ./pkg/generators/...git diff --checkFixes: #630