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

fix(core): Referencing combined enums results in a duplicate schema name error #1488

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

lnkarma
Copy link
Contributor

@lnkarma lnkarma commented Jun 28, 2024

Status

READY

Description

Fix #1419

Fixes Referencing combined enums results in a duplicate schema name error #1419

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

> cd tests
> yarn generate:default

You should see

🎉 combined-enum - Your OpenAPI spec has been converted into ready to use orval!

Should generate the following file at tests/generated/default/combine-enum/schemas/colors.ts

import { Colors1 } from './colors1';
import { Colors2 } from './colors2';

export type Colors = typeof Colors[keyof typeof Colors] 

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const Colors = {...Colors1,...Colors2,} as const;

@melloware melloware added this to the 6.32.0 milestone Jun 28, 2024
@melloware melloware added the bug Something isn't working label Jun 28, 2024
@melloware melloware merged commit 3b27e47 into orval-labs:master Jul 4, 2024
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

Referencing combined enums results in a duplicate schema name error
2 participants