Coder Social home page Coder Social logo

eve-docs's Introduction

Eve-docs

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.

eve-docs's People

Contributors

charlesflynn avatar kynan avatar heath avatar joshvillbrandt avatar petrjasek avatar mikenerone avatar wieshka avatar

Watchers

James Cloos avatar Harry Jubb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.