8000 Support nullable slice elements and map values by iamtakingiteasy · Pull Request #2185 · oapi-codegen/oapi-codegen · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@iamtakingiteasy
Copy link
@iamtakingiteasy iamtakingiteasy commented Jan 20, 2026

Adds support for nullable slice elements, e.g. []*string, if items are declared as nullable: true (analogous to map[string]*string if additionalProperties is having nullable: true and to fields describing/referencing nullable types), allows handling of values like ["a", null, null, "d", ""] and occasionally improves the UX with DTO processing.

Closes #158
Based on and re-implements #158-specific portion of #490, also with tests for the map case and none of the unrelated changes.

@iamtakingiteasy iamtakingiteasy requested a review from a team as a code owner January 20, 2026 07:32
@iamtakingiteasy iamtakingiteasy force-pushed the support-nullable-vectors branch from 7fd08d0 to bf89b07 Compare January 20, 2026 07:38
@iamtakingiteasy
Copy link
Author
iamtakingiteasy commented Jan 20, 2026

Sorted testcases by nullability.

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.

Checking for the *[] vs []*

1 participant

0