Skip to content

feat: updated existing APIs to enable to generate OpenAPI documentation - #157

Open
Jagrutiti wants to merge 30 commits into
openfoodfacts:mainfrom
Jagrutiti:change-to-enable-openapi-doc
Open

feat: updated existing APIs to enable to generate OpenAPI documentation #157
Jagrutiti wants to merge 30 commits into
openfoodfacts:mainfrom
Jagrutiti:change-to-enable-openapi-doc

Conversation

@Jagrutiti

@Jagrutiti Jagrutiti commented Dec 25, 2022

Copy link
Copy Markdown
Member

What

  • Added BaseModel and Body Parameters to the documentation, by updating existing APIs to enable to generate OpenAPI documentation

Closes

Change API to enable auto OpenAPI documentation #77

@Jagrutiti
Jagrutiti requested a review from a team as a code owner December 25, 2022 13:02

@aadarsh-ram aadarsh-ram left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @Jagrutiti! There are some changes that I have requested, which can be easily rectified. Thanks for the contribution!

Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/api.py Outdated
Jagrutiti and others added 7 commits December 26, 2022 20:24
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
Co-authored-by: Aadarsh A <aadarsh.ram@gmail.com>
@teolemon teolemon added 📚 documentation Improvements or additions to documentation OpenAPI labels Dec 27, 2022
Comment thread backend/editor/models.py Outdated

@alexgarel alexgarel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR :-)

Some comments, I think we should improve a bit before merging.

BTW what is this taxonomy-editor-frontend/build directory you added ?

Comment thread backend/editor/models.py Outdated
Comment thread backend/editor/models.py Outdated
@alexgarel

Copy link
Copy Markdown
Member

BTW what is this taxonomy-editor-frontend/build directory you added ?

Sorry I misread this, it was removed, but it makes your tests fail… you should not remove the build/.empty file, it is important indeed !

Comment thread backend/editor/models.py Outdated
Comment thread backend/editor/models.py
Comment thread backend/editor/api.py Outdated
Comment thread backend/editor/models.py Outdated
Comment thread backend/editor/models.py
Jagrutiti and others added 2 commits February 7, 2023 21:35
Co-authored-by: Alex Garel <alex@garel.org>
Comment thread backend/editor/api.py
Comment thread backend/editor/models.py

@alexgarel alexgarel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Jagrutiti ok, thanks, that's a good first step.

I think we have to go further to describe the API more deeply (on the response side). Did you test everything is still working after your changes ?

Comment thread backend/editor/models.py Outdated
@Jagrutiti

Copy link
Copy Markdown
Member Author

I think we have to go further to describe the API more deeply (on the response side).

Do you mean adding response description as give in this documentation: https://fastapi.tiangolo.com/advanced/additional-responses/#additional-response-with-model?

Did you test everything is still working after your changes ?

All the tests cases did pass. And the APIs are working fine.

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 OpenAPI

Projects

Status: Todo
Status: Undecided

Development

Successfully merging this pull request may close these issues.

4 participants