Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: allow the use of "any" in EntityDefinition jzodSchemas #17

Open
miroir-framework opened this issue Apr 2, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@miroir-framework
Copy link
Owner

miroir-framework commented Apr 2, 2024

There's a catch when using "any" in jzodSchemas for EntityDefinitions.

For example, when editing the "Report" EntityDefinition, we get:
image

This is due to:

[...]
          "rootReportSection": {
            "type": "object",
            "definition": {
              "reportParametersToFetchQueryParametersTransformer": {
                "type": "record",
                "optional": true,
                "definition": {
                  "type": "simpleType",
                  "definition": "any"
                }
              },
              "reportParameters": {
                "type": "record",
                "optional": true,
                "definition": {
                  "type": "simpleType",
                  "definition": "any"
                }
              },
[...]

because JzodElementEditor does not know what to do when faced with "any" type.

Ideal Solution would be to allow the creation of any js value (literal, array, object...), and infer its type along the way, but keeping the "any" for the EntityDefinition. Can we really be that flexible?

If "any" cannot be reasonably enabled in JzodSchema for EntityDefinitions, what would a "reasonable" solution be?

@miroir-framework miroir-framework added the bug Something isn't working label Apr 2, 2024
@miroir-framework miroir-framework added this to the Miroir 0.5.0 milestone Apr 2, 2024
@miroir-framework miroir-framework self-assigned this Apr 2, 2024
miroir-framework added a commit that referenced this issue Apr 3, 2024
…mporary patch removing "any" attributes from EntityDefinitions, until they are allowed.
@miroir-framework miroir-framework added the enhancement New feature or request label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant