sphinx-contrib / openapi

OpenAPI (fka Swagger) spec renderer for Sphinx.
https://sphinxcontrib-openapi.readthedocs.io
BSD 2-Clause "Simplified" License
111 stars 81 forks source link

[feature request]: Filter by method for a path #108

Open Kimamisa opened 3 years ago

Kimamisa commented 3 years ago

I am using the directive to include some generated API doc into my documentation, and thus using the :paths: parameter.

Would it be possible to select a list of method for each path, to avoid displaying all methods for a path ?

Like:

.. openapi:: my_spec.yml
   :paths:
      /resource[get,delete]
   :encoding: utf-8

Thanks !

benjaoming commented 3 years ago

I like this proposal a lot. It could also be implemented like this:

.. openapi:: my_spec.yml
   :paths:
      /resource
   :methods:
      get, delete
   :encoding: utf-8