Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Failed to generate graphql types #498

Description

@rogalmic

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?

Activity

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