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

Put all generated types under a "types" directory #855

Closed
pmcelhaney opened this issue Apr 15, 2024 · 3 comments · Fixed by #919
Closed

Put all generated types under a "types" directory #855

pmcelhaney opened this issue Apr 15, 2024 · 3 comments · Fixed by #919
Labels
enhancement New feature or request

Comments

@pmcelhaney
Copy link
Owner

A fairly simple change:

  • path-types -> types/paths
  • components -> types/components
  • paths -> routes

I think it will be easier to understand what's what. The structure of the types directory should resemble the structure of the OpenAPI spec. And "routes" is a clearer indicator of what the directory contains.

I don't like to catch people off guard with disruptive changes like this. If we're going to do it, it should be before 1.0.

@pmcelhaney
Copy link
Owner Author

Maybe there can be a grace period with backwards compatibility. If a paths directory is detected, Counterfact will continue to use the old structure but print a warning with migration instructions. (It's a matter of renaming a couple of directories and then doing a search and replace.)

@dethell
Copy link
Collaborator

dethell commented Apr 15, 2024

I do think the renaming is better. Not so worried about the breaking change, pre-1.0 but rather than supporting both, what about a migration script that just moves everything to the new places?

@pmcelhaney
Copy link
Owner Author

pmcelhaney commented Apr 16, 2024

Could write a migration script. I just don't want to inflict unexpected changes on people.

After 1.0 I'm going to start promoting. I'd rather get this sort of thing out of the way before more users come.

@pmcelhaney pmcelhaney added the enhancement New feature or request label Apr 30, 2024
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 a pull request may close this issue.

2 participants