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

[Docs] [sites] Add summary and description to sites routes #38

Merged
merged 5 commits into from
Nov 17, 2020

Conversation

fe51
Copy link
Member

@fe51 fe51 commented Nov 16, 2020

This PR aims at adding summary and description to the sites routes.

  • On one side, I might suggest to not specify if field are required and the accepted range of value, not only because I might be lazy, but because it is specified in the schema, and it avoids the need to update the docs if the schema evolves. On the other side, it could helpful for api clients, so what do you think ?
  • Concerning the site creation route, I have specified "click on schema" because, at first, I did not realise schema was clickable (see below). Is it only me ? :D

image

Feedback are welcome

@codecov
Copy link

codecov bot commented Nov 16, 2020

Codecov Report

Merging #38 (ca3d60f) into master (a36d5ae) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #38   +/-   ##
=======================================
  Coverage   88.65%   88.65%           
=======================================
  Files          18       18           
  Lines         529      529           
=======================================
  Hits          469      469           
  Misses         60       60           
Flag Coverage Δ
unittests 88.65% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/api/routes/sites.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a36d5ae...ca3d60f. Read the comment docs.

@fe51 fe51 linked an issue Nov 16, 2020 that may be closed by this pull request
9 tasks
@fe51 fe51 added endpoint: sites topic: docs Improvements or additions to documentation labels Nov 16, 2020
@fe51 fe51 self-assigned this Nov 16, 2020
@fe51 fe51 marked this pull request as ready for review November 17, 2020 10:54
@frgfm
Copy link
Member

frgfm commented Nov 17, 2020

Thanks for the PR @fe51 !
Could you upload a screenshot of how it renders for the admin post route of sites please? I'm unsure whether we should specify each argument considering the schema is already available.

Also, any idea about the docker test failure?

@frgfm frgfm added this to the 0.1.0 milestone Nov 17, 2020
@frgfm
Copy link
Member

frgfm commented Nov 17, 2020

@fe51 The docker issue should be fixed with #39!

@fe51
Copy link
Member Author

fe51 commented Nov 17, 2020

I will quickly upload screenshots !

"I'm unsure whether we should specify each argument considering the schema is already available." ---> I completely agree with you and most of the fields are explicit, thus, the description of argument not pertinent.

However, in some case, could be interesting to add information especially a unit (not pertinent here, but as an example, altitude in meters) --> Eventually, I just discover that I can add a description in schemas and it renders in the docs (see the screen below) --> I suggest to add a description when needed (so far, units)
image

@fe51
Copy link
Member Author

fe51 commented Nov 17, 2020

Here is the screenshot :
I have deleted arguments description.

image

Also @frgfm , I have not noticed the docker test failure yesterday when I have created the PR, and I think it was not in failure, thanks to #39 its is okay now :)

Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@fe51 fe51 merged commit aaecd67 into master Nov 17, 2020
@frgfm frgfm deleted the route-desc-sites branch November 17, 2020 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endpoint: sites topic: docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants