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

Research Best Methods for Swagger Documentation #68

Closed
dankolbman opened this issue Jan 24, 2018 · 3 comments
Closed

Research Best Methods for Swagger Documentation #68

dankolbman opened this issue Jan 24, 2018 · 3 comments
Assignees
Labels
feature New functionality
Milestone

Comments

@dankolbman
Copy link
Contributor

dankolbman commented Jan 24, 2018

Switching away from RESTPlus cost us the automatic swagger documentation.
There is still a couple tools to make documentation easier with Marshmallow:

apispec
flasgger

Time box research for Flask-APIspec to no more than 4 hours. If it is not straight forward- then we need to proceed with manual documentation for MVP - which would require a ticket for each resource ~2 pts each.

@dankolbman dankolbman added this to the CHOP Sprint 1 milestone Jan 29, 2018
@dankolbman dankolbman self-assigned this Jan 29, 2018
@dankolbman dankolbman added the feature New functionality label Jan 29, 2018
@baileyckelly baileyckelly changed the title Add swagger documentation Research Best Methods for Swagger Documentation Feb 5, 2018
@znatty22
Copy link
Member

znatty22 commented Feb 6, 2018

Been playing around with flask-apispec for an hour or so but its not looking too good right now. Trying to follow basic usage instructions according to docs but I'm having a problem getting it to work with our blueprint. Might be something I'm doing wrong but I'm not sure yet.

Even though I haven't put too much time into this, I'm heavily leaning towards not using an auto-doc library right now and going with manual swagger docs. Also, there does seem to be a couple open issues/PRs that may affect us in the near future (one of which @dankolbman referred to already - here)

If anyone is interested, I pushed what I have so far to this branch

@dankolbman
Copy link
Contributor Author

dankolbman commented Feb 6, 2018

Yah, see issue #181 over at marshmallow-code/apispec, it's the same thing. I've been meaning to take a crack at it, but it's just not going to be that pretty the way I'm thinking of solving it now.

We can still do manual docs inside jsons in each of the resource directories, then reference them in the doc string, and compile them and join them with the apispeced mashmallow schemas to create the final swagger. It would still be almost entirely manual, but it would save us from having an enormous swagger.json that needs to be maintained.

@znatty22
Copy link
Member

znatty22 commented Feb 6, 2018

Sounds good to me. Even if I got this working and #181 was resolved, I have a feeling we will run into other headaches down the road. flask-apispec seems cool, but it looks like its too young.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

3 participants