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

Remove v1 folder structure #467

Merged
merged 3 commits into from
Feb 27, 2023
Merged

Conversation

JosephMarinier
Copy link
Contributor

Description:

Those tags organize the sections of the Swagger UI.

  • Change Admin to Config
  • Move tags definitions to the app level
  • Also, remove "v1" for every tag as we don't have any other versions of the API. If one day we do, we can add v1 back.

image

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

Also, remove "v1" for every tag as we don't have any other versions of the API. If one day we do, we can add v1 back.
Copy link
Contributor

@gabegma gabegma left a comment

Choose a reason for hiding this comment

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

Good idea! For the v1, I remember in the past suggesting to remove the v1 folder (which is different than what you are doing here) and getting some pushback from the team that it was best practice to keep the v1 references. Do you know if that would apply to tags as well?

@JosephMarinier
Copy link
Contributor Author

JosephMarinier commented Feb 27, 2023

I don't mind removing the v1 folder.
The thing that would have been a good practice (and I guess that's where the confusion came from) would have been to have /v1 in the API paths (aligning with the current folder structure). This way, if we have to do a big breaking change in say /v1/example, we can add a /v2/example and let clients transition progressively from v1 (deprecated) to v2.
That being said, our users don't really use our API directly (unlike Toolkit for example) and we control our only client: the front end. So, I don't think this /v1 thing is necessary. And since we don't have /v1 in our API paths, the v1 folder doesn't make much sense. I will remove it.

@JosephMarinier JosephMarinier changed the title Refactor FastAPI tags Remove v1 folder Feb 27, 2023
@JosephMarinier JosephMarinier changed the title Remove v1 folder Remove v1 folder structure Feb 27, 2023
@JosephMarinier JosephMarinier merged commit 46de0d5 into main Feb 27, 2023
@JosephMarinier JosephMarinier deleted the joseph/refactor-fastapi-tags branch February 27, 2023 20:38
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.

2 participants