Skip to content

Add enum support to createJsonSchema#1578

Open
ChrisArasin wants to merge 1 commit into
google:masterfrom
ChrisArasin:fix-1577-enum-json-schema
Open

Add enum support to createJsonSchema#1578
ChrisArasin wants to merge 1 commit into
google:masterfrom
ChrisArasin:fix-1577-enum-json-schema

Conversation

@ChrisArasin

Copy link
Copy Markdown

Adds enum support to createJsonSchema generation.

Enum-typed fields in createJsonSchema were emitting {"type": "object"}.
This emits a JSON Schema enum constraint (and default) using the encoded
values, reusing the existing enum-encoding path so @JsonValue and
JsonEnum.valueField are respected.

Closes #1577

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.

createJsonSchema: enums emit {"type": "object"} instead of {"enum": [...]}

1 participant