Skip to main content

Generates documentation for Eve APIs

Project description

A blueprint that generates documentation for Eve APIs in HTML and JSON formats. Eve-docs creates the documentation from your existing Eve configuration file, with no additional configuration required.

Installation

Clone this repo into your Eve application and modify your launch script to activate the blueprints:

from flask.ext.bootstrap import Bootstrap
from eve_docs import eve_docs
...
Bootstrap(app)
app.register_blueprint(eve_docs, url_prefix='/docs')

After restarting, documentation is availabile at the url_prefix defined in your launch script. example.py shows how to do this using the launch script from Nicola Iarocci’s eve-demo repo.

HTML output

The HTML documentation is produced using the Flask-Bootstrap blueprint. Expand each domain to show available endpoint methods, and further expand each method to show parameter details. A screenshot with one method expanded follows, and you can also view a fully expanded example. Sample output

JSON output

Documentation is also exposed as JSON at url_prefix/spec.json for programmatic consumption. Example output:

{
  "base": "http://localhost:5000",
  "domains": {
    "people": {
      "/people/{_id}": {
        "GET": {
          "label": "Retrieve a person",
          "params": [
            {
              "name": "_id",
              "type": "string",
              "required": true
            }
          ]
          ...

License

Released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Eve-docs-0.1.4.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file Eve-docs-0.1.4.tar.gz.

File metadata

  • Download URL: Eve-docs-0.1.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Eve-docs-0.1.4.tar.gz
Algorithm Hash digest
SHA256 235110db2af061c1f0d068a6dcf97a8e5c63a8672740bee7389bbf2cdbd6d997
MD5 88e38dc20940951e13735c54fc50e76c
BLAKE2b-256 b69ad977b5d7d36424cf6f5bdb71cb4ac274336cc3d69a1aad42a22e68d4fcb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page