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

Error: Duplicate schema names detected #1733

Open
SamyZog opened this issue Dec 3, 2024 · 2 comments
Open

Error: Duplicate schema names detected #1733

SamyZog opened this issue Dec 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SamyZog
Copy link

SamyZog commented Dec 3, 2024

Trying to generate swagger client from openapi 3.0.3
Orval v7.3.0 (also tried v7.2.0)

When generating i get an error

Error: Duplicate schema names detected:
  1x PatchedPayoutRequestListAdminDTOReimbursability
  1x PayoutRequestListAdminDTOReimbursability
  1x PayoutRequestRetrieveAdminDTOReimbursability
  1x PayoutRequestRetrieveUserDTOReimbursability
  1x PayoutRequestSetReimbursabilityDTOReimbursability

The schema is valid, I have ran it through the swagger editor and all is clean.

this is my config

export default defineConfig({
  newTechService: {
    hooks: {
      afterAllFilesWrite: "eslint --fix src/api",
    },
    output: {
      mode: "tags-split",
      target: "./src/api/query",
      schemas: "./src/api/model",
      client: "react-query",
      httpClient: "axios",
      urlEncodeParameters: false,
      clean: true,
      tslint: true,
      override: {
        fetch: {
          includeHttpResponseReturnType: false,
        },
        query: {
          signal: true,
          useInfinite: false,
        },
        mutator: {
          path: "./src/api/custom-instance/axios-instance.ts",
          name: "customInstance",
        },
        components: {
          schemas: {
            suffix: "DTO",
          },
          responses: {
            suffix: "Response",
          },
          parameters: {
            suffix: "Params",
          },
          requestBodies: {
            suffix: "Body",
          },
        },
      },
    },
    input: {
      target: ...
    },
  },
});
@melloware melloware added the bug Something isn't working label Dec 3, 2024
@nitoba
Copy link

nitoba commented Dec 7, 2024

The same issue here

@AllieJonsson
Copy link
Contributor

@SamyZog Could you provide the schema specification so I can try to replicate this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants