Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

oneOf instead of anyOf in json_schema for rfl::Variant #375

Open

Description

@frongere

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?

Sorry if this is an obvious question.

Thanks !

Activity

  1. liuzicheng1987 commented on Mar 8, 2025

    @liuzicheng1987
    Collaborator

    No, but you are right that oneOf is more accurate. We should change it.

  2. frongere commented on Mar 8, 2025

    @frongere
    Author

    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 ?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions