mozilla

Example documentation

This is an example of what you can get with the Cornice auto documentation feature:

Below is the result of this directive:

.. services::
   :modules: cornice.tests.validationapp

Service service at /service

GET

Response: json

POST

The request body should be a JSON object.

Response: json

Service2 service at /service2

GET

Accepted content types:
  • text/plain

Response: string

GET

Accepted content types:
  • application/json
  • text/json

Response: json

Service3 service at /service3

PUT

Accepted content types:
  • <function <lambda> at 0x7fa1a100a758>

Response: json

GET

Accepted content types:
  • <function <lambda> at 0x7fa1a100a5f0>

Response: json

Service4 service at /service4

POST

Response: json

Filtered service at /filtered

POST

Response: json

GET

Response: json

Service5 service at /service5

PUT

Response: json

POST

Response: json

GET

Response: json

Service6 service at /service6

PUT

Response: json

POST

Response: json

Service7 service at /service7

PUT

Accepted content types:
  • text/xml
  • text/plain

Response: json

POST

Accepted content types:
  • text/xml

Response: json