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 chaotic shuffle of generated types #1808

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

FabienCharlier
Copy link
Contributor

@FabienCharlier FabienCharlier commented Jan 10, 2025

Status

Fix #1382

WIP

Description

Sometimes, when generating Orval schema, some generated types are moved around the file. This PR fixes it.
Related to issue Types in generated react-query schema have unstable order, causing noisy diffs #1382

Related PRs

No related PRs

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

> git pull --prune
> git checkout <branch>
> grunt jasmine

@FabienCharlier
Copy link
Contributor Author

Considering that the sort is not necessary (you can use types before defining them in Typescript), and that it has never properly worked, I think that we should get rid of it. This will lead to the items being sorted in the same order than in the OpenApi file, which looks like a good solution to me.

@melloware
Copy link
Collaborator

LGTM cc @AllieJonsson ?

@melloware melloware added the enhancement New feature or request label Jan 10, 2025
@AllieJonsson
Copy link
Contributor

LGTM cc @AllieJonsson ?

Seems logical!

@melloware melloware merged commit 9643099 into orval-labs:master Jan 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Types in generated react-query schema have unstable order, causing noisy diffs
3 participants