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

Failed to generate graphql types #498

Open
rogalmic opened this issue Aug 18, 2023 · 0 comments
Open

Failed to generate graphql types #498

rogalmic opened this issue Aug 18, 2023 · 0 comments

Comments

@rogalmic
Copy link

Hi,

With newest umbraco forms openapi schema, I cannot generate schema:

const openApiSchema = await response.json();
  const formTypes = await openApiToGraphql(openApiSchema);

Attaching the json from response used above. umbraco_forms_api_openapi.zip

Seems the issue is that enums inside "oneOf" are failing:

          "fieldIndicationType": {
            "description": "Gets or sets the form's field mandatory or optional field indication type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FormFieldIndication"
              }
            ]
          },



...

      "FormFieldIndication": {
        "type": "integer",
        "description": "Enumeration for field indications.",
        "x-enumNames": [
          "NoIndicator",
          "MarkMandatoryFields",
          "MarkOptionalFields"
        ],
        "enum": [
          0,
          1,
          2
        ]
      },

There is an exception in createOrReuseEnum(), enum is undefined (expanding schema):
image

Is that so that enum cannot be part of complex type?

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

No branches or pull requests

1 participant