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

BITMAKER-2934 Improve estela generated OpenAPI documentation #171

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johann2357
Copy link

@johann2357 johann2357 commented Apr 17, 2023

Description

  • Update swagger host in estela api settings.
  • Add tags to estela api endpoints.
  • Re-generate docs using make docs.

Issue

Checklist before requesting a review

  • I have performed a self-review of my code.
  • My code follows the style guidelines of this project.
  • I have made corresponding changes to the documentation.
  • New and existing tests pass locally with my changes.
  • If this change is a core feature, I have added thorough tests.
  • If this change affects or depends on the behavior of other estela repositories, I have created pull requests with the relevant changes in the affected repositories. Please, refer to our official documentation.
  • I understand that my pull request may be closed if it becomes obvious or I did not perform all of the steps above.

@johann2357 johann2357 marked this pull request as ready for review April 17, 2023 23:42
@johann2357 johann2357 added the documentation Improvements or additions to documentation label Apr 18, 2023
estela-api/config/settings/base.py Outdated Show resolved Hide resolved
estela-api/api/views/auth.py Outdated Show resolved Hide resolved
)
def request(self, request, *args, **kwargs):
def request_reset(self, request, *args, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Tags were not generated properly for this one (defaulting to api). Probably because behind of that inheritance there is already a self.request used for another thing and @swagger_auto_schema was not detecting the tag correctly. So the workaround would be to preserve the same path by using url_path and renaming the method.

@johann2357 johann2357 changed the title BITMAKER-2563 Improve estela generated OpenAPI documentation BITMAKER-2934 Improve estela generated OpenAPI documentation Apr 21, 2023
@johann2357 johann2357 self-assigned this Apr 21, 2023
Add tags to estela api endpoints in current swagger_auto_schema
decorator.
Add tags for inherited methods from ModelViewSet and other mixins. Since
in the past all of those were tagged just as `api`.
Update `generated-api` code and `api.yaml` spec.
@mgonnav
Copy link
Member

mgonnav commented Oct 24, 2024

@joaquingx The changes in this PR help tidy up our autogenerated swagger API specification, which in turn also helps have a cleaner interface in the endpoints docs (https://estela.bitmaker.la/estela/api/endpoints.html#tag/api), where you see right now everything is under a single category api. However, in order to be able to merge this we need to make changes in Estela Web so that the code uses the new autogenerated API classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants