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: reintroduce fix for native enums #1957

Merged
merged 6 commits into from
Mar 18, 2025

Conversation

AllieJonsson
Copy link
Contributor

@AllieJonsson AllieJonsson commented Mar 1, 2025

Status

READY

Description

fixes #1880
Reintroduces the fix that was reverted in #1945
@soartec-lab please try out generating with your spec again, any input of what is causing the issue is appreciated (e.g. part of spec, specific function that doesn't work etc.)

Related PRs

List related PRs against other branches:

branch PR
fix/native-enums-2 #1882
revert-1882-fix/native-enums-2 #1945

@melloware melloware requested a review from soartec-lab March 1, 2025 14:10
@soartec-lab
Copy link
Member

Thanks, I'll check this later.

@soartec-lab
Copy link
Member

soartec-lab commented Mar 8, 2025

Hi, @AllieJonsson Sorry for the wait.
I tried this but I get the following error:

petstoreFile: Cleaning output folder
🛑 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:421:14)
    at resolveMockValue (/app/packages/mock/dist/index.js:539:21)
    at /app/packages/mock/dist/index.js:658:29
    at Array.reduce (<anonymous>)
    at combineSchemasMock (/app/packages/mock/dist/index.js:640:60)
    at getMockObject (/app/packages/mock/dist/index.js:119:12)
at getMockScalar (/app/packages/mock/dist/index.js:421:14)

This is probably happening in a circular case, like when users follow each other like a social media.
I'll continue to look into this bit by bit, and share more details as I find them.

@AllieJonsson
Copy link
Contributor Author

@soartec-lab Please try this again when you have the time! :)

@soartec-lab
Copy link
Member

@AllieJonsson
Awesome, I tried this and got no errors 🙌

@melloware
Copy link
Collaborator

@soartec-lab can you also review my PR it fixes a CVE in JSON-PAth

@AllieJonsson AllieJonsson marked this pull request as ready for review March 18, 2025 13:36
@melloware melloware merged commit 3221aae into orval-labs:master Mar 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native enums with custom names are not declared correctly
3 participants