Plumber: Improved swagger (Docstrings?)

Created on 25 Jun 2018  路  4Comments  路  Source: rstudio/plumber

I have the impresseion the swagger/openapi funtionality is not fully implemented.
E.g. parameter for POST body defintion, as in http://petstore.swagger.io/#/pet/addPet.

#* @param body:body*

will give an error.

The approach in RRestserve http://restrserve.org/quick-start.html#swagger_ui_and_openapi via docstrings seems more flexible, but more ugly to write/ maintain.

Any ideas how to improve this in plumber? I like the roxygen style, but it needs much more functionality. If you point me in the correct direction, I could try to prepare a PR...

intermediate low help wanted medium swagger enhancement

Most helpful comment

Have talked with a team member. Updates are in the works. 馃槂

All 4 comments

plumber needs a new body type and how to handle it for swagger.

When reading the type, it should throw an error if the route is not a POST.

It's not only about body, but also about full implementation of swagger & openapi specification.

Have talked with a team member. Updates are in the works. 馃槂

Closing as arrays are now supported and the router object can also set the openapi yaml information using pr_set_api_spec()

Was this page helpful?
0 / 5 - 0 ratings