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): adjustments to native enums #1882

Merged
merged 3 commits into from
Feb 8, 2025

Conversation

AllieJonsson
Copy link
Contributor

Status

READY

Description

Fixes #1880
This reverts #1860 and instead aims to fix the issue in a better way, by omitting the property in the parent object.
This also fixes issues with faker and native enums.

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

melloware
melloware previously approved these changes Feb 6, 2025
Copy link
Member

@soartec-lab soartec-lab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@soartec-lab soartec-lab merged commit fcd942b into orval-labs:master Feb 8, 2025
2 checks passed
@soartec-lab soartec-lab added bug Something isn't working msw MSW related issues and removed msw MSW related issues labels Feb 8, 2025
@soartec-lab soartec-lab changed the title fix: adjustments to native enums fix(core): adjustments to native enums Feb 8, 2025
@AllieJonsson AllieJonsson deleted the fix/native-enums-2 branch February 21, 2025 07:19
@soartec-lab
Copy link
Member

@AllieJonsson

It seems that RangeError: Maximum call stack size exceeded has started to occur in my complex OpenAPI since this PR merged.

petstoreFile - RangeError: Maximum call stack size exceeded
    at /app/packages/mock/dist/index.js:183:16
    at Array.map (<anonymous>)
    at getMockObject (/app/packages/mock/dist/index.js:159:36)
    at getMockScalar (/app/packages/mock/dist/index.js:419:14)
    at resolveMockValue (/app/packages/mock/dist/index.js:543:21)
    at /app/packages/mock/dist/index.js:665:29
    at Array.reduce (<anonymous>)
    at combineSchemasMock (/app/packages/mock/dist/index.js:647:60)
    at getMockObject (/app/packages/mock/dist/index.js:119:12)
    at getMockScalar (/app/packages/mock/dist/index.js:419:14)

We want to create a new version release, so can we revert this PR?

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.

Native enums with custom names are not declared correctly
3 participants