Repository navigation
fix: include-if-null-spec-nullable - #845
Open
Mastersam07 wants to merge 25 commits into
Open
Mastersam07 wants to merge 25 commits into
Mastersam07 wants to merge 25 commits into
Conversation
fix: `includeIfNull: false` silently dropping null values for spec-nu…
fix: add index, name, and values to enum exception words
Previously, any list property on a class whose name ends with `$Item` was generated as `List<Object>` even when items resolved to a typed enum or primitive. Tighten the short-circuit so it fires only when `items.properties` is non-empty (i.e. items is actually a nested object), letting the normal type resolution emit `List<enums.X>` / `List<String>` / `List<int>` / etc.
fix: narrow $Item list-type guard to nested-object items only
fix: type array item enum query parameters and comma-join non-exploded lists
fix: type referenced array enum query parameters as lists
fix: skip enum values without a wire value when serializing lists
feat: generate sealed unions for oneOf schemas behind generate_one_of_unions
…alues with patterns
…eck required keys
…unreachable branches
…with a model postfix
…minators, single branches and nullability
…anches, text bodies and array-response enums
feat: type oneOf array items, request bodies, responses and nullable branches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current behaviour
When
include_if_nullwas set tofalseglobally, fields explicitly markednullable: truein the OpenAPI spec would have their null values omitted during serialization. This is incorrect because the spec author declarednullas a valid, intentional value for those fields.Incoming/Expected behaviour
Fields with spec-declared nullability (
nullable: trueor type array containingnull) getincludeIfNull: trueregardless of the global setting, ensuringnullvalues are always serialized for those fields.