You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
oneOf instead of anyOf in json_schema for rfl::Variant #375
When using rfl::Variant to define several alternatives to json object and exporting it to json schema, it automatically maps to anyOf. Is there a way to map to oneOf instead?
Activity
liuzicheng1987 commentedon Mar 8, 2025
No, but you are right that oneOf is more accurate. We should change it.
frongere commentedon Mar 8, 2025
Ok, so perhaps the same should be adopted to rfl::TaggedUnion.
Maybe the ideal situation would be to have a way to specify whether you want a oneOf, anyOf or allOf (and not ?).
Emit oneOf for rfl::TaggedUnion in JSON schema
Emit oneOf for rfl::TaggedUnion in JSON schema
Emit oneOf for rfl::TaggedUnion in JSON schema
feat(json-schema): add rfl::VariantsAsOneOf opt-in processor (munich-…
feat(json-schema): add rfl::VariantsAsOneOf opt-in processor (munich-…
feat(json-schema): add rfl::VariantsAsOneOf opt-in processor (munich-…