Skip to content

Conversation

@lukad
Copy link
Collaborator

@lukad lukad commented May 20, 2025

This PR addresses an issue with schemas where options are provided via x-jsf-presentation and the schema uses enum or items.enum instead of oneOf with const & title.

Previously we were always trying to generate options from the enum even if options were already provided via x-jsf-presentation and thus also spread onto the field. In those cases we must not try to generate option based on the enum.

I've added a test that shows an example schema for which we were generating incorrect options previously.

@lukad lukad force-pushed the options-from-x-jsf-presentation branch from 4872810 to adfb96c Compare May 20, 2025 15:18
@lukad lukad marked this pull request as ready for review May 20, 2025 15:23
@lukad lukad changed the title fix(next): take x-jsf-presentation options into account when generating options fix(next): don't override options field provided by x-jsf-presentation May 20, 2025
@lukad lukad changed the title fix(next): don't override options field provided by x-jsf-presentation fix(next): don't override options property provided via x-jsf-presentation May 20, 2025
@lukad lukad merged commit 5e81ca8 into main May 20, 2025
2 checks passed
@lukad lukad deleted the options-from-x-jsf-presentation branch May 20, 2025 16:07
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.

3 participants