Skip to content

Transformers warning: too complex #1636

@BierDav

Description

@BierDav

Description

I wanted to generate the client SDK for ory kratos: https://raw.githubusercontent.com/ory/sdk/refs/heads/master/spec/kratos/v1.3.3.json

But with the new 0.63.0 version it failes with following error message:

⏳ Generating from https://raw.githubusercontent.com/ory/sdk/refs/heads/master/spec/kratos/v1.3.3.json
❗️ Transformers warning: schema {"items":[{"items":[{"properties":{"action":{"const":"show_verification_ui","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/continueWithVerificationUi"}],"logicalOperator":"and"},{"items":[{"properties":{"action":{"const":"set_ory_session_token","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/continueWithSetOrySessionToken"}],"logicalOperator":"and""
},{"items":[{"properties":{"action":{"const":"show_settings_ui","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/continueWithSettingsUi"}],"logicalOperator":"and"},{"items":[{"properties":{"action":{"const":"show_recovery_ui","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/continueWithRecoveryUi"}],"logicalOperator":"and"},{"items":[{"properties":{"action":{"const":"redirect_browser_to","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/continueWithRedirectBrowserTo"}],"logicalOperator":"and"}],"logicalOperator":"or"} is too complex and won't be currently processed. This will likely produce an incomplete transformer which is not what you want. Please open an issue if you'd like this improved https://github.com/hey-api/openapi-ts/issues
❗️ Transformers warning: schema {"title":"Attributes represents a list of attributes (e.g. `href=\"foo\"` for links).","items":[{"items":[{"properties":{"node_type":{"const":"input","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/uiNodeInputAttributes"}],"logicalOperator":"and"},{"items":[{"properties":{"node_type":{"const":"text","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/uii
NodeTextAttributes"}],"logicalOperator":"and"},{"items":[{"properties":{"node_type":{"const":"img","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/uiNodeImageAttributes"}],"logicalOperator":"and"},{"items":[{"properties":{"node_type":{"const":"a","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/uiNodeAnchorAttributes"}],"logicalOperator":"and"},{"items":[{"properties":{"node_type":{"const":"script","type":"string"}},"type":"object"},{"$ref":"#/components/schemas/uiNodeScriptAttributes"}],"logicalOperator":"and"}],"logicalOperator":"or"} is too complex and won't be currently processed. This will likely produce an incomplete transformer which is not what you want. Please open an issue if you'd like this improved https://github.com/hey-api/openapi-ts/issues
🚀 Done! Your output is in C:\Users\...\src\api\kratos

Here is my generator configuration:

    await createClient({
      input: source,
      output: targetDir,
      plugins: [
        {
          name: "@hey-api/client-fetch"
        },
        {
          name: "@tanstack/solid-query",
          mutationOptions: true,
          infiniteQueryOptions: true,
          queryOptions: true
        },
        {
          name: "@hey-api/transformers",
          dates: true,
          bigInt: false
        },
        {
          name: "@hey-api/typescript",
          enumsCase: "PascalCase",
          enums: "typescript+namespace"
          // exportInlineEnums: true
        }
      ]
      // experimentalParser: true,
      // {
      //   name: "@hey-api/typescript",
      //   enums: "typescript+namespace",
      //   style: "PascalCase",
      // }
    });

With the old transformer this json did work, would really appreciate to get this fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions