Skip to main content

Swagger extension for Eve powered RESTful APIs

Project description

Swagger extension for Eve powered RESTful APIs.

Current Status

Experimental playground.

Usage

from eve import Eve
from eve_swagger import swagger

app = Eve()
app.register_blueprint(swagger)

# required. See http://swagger.io/specification/#infoObject for details.
app.config['SWAGGER_INFO'] = {
    'title': 'My Supercool API',
    'version': '1.0',
    'description': 'an API description',
    'termsOfService': 'my terms of service',
    'contact': {
        'name': 'nicola',
        'url': 'http://nicolaiarocci.com'
    },
    'license': {
        'name': 'BSD',
        'url': 'https://github.com/nicolaiarocci/eve-swagger/blob/master/LICENSE',
    }
},

# optional. Will use flask.request.host if missing.
app.config['SWAGGER_HOST'] = 'myhost.com'

if __name__ == '__main__':
    app.run()

When API is up and running, visit the /api-docs endpoint. The resulting JSON can then be used with swagger tooling, like the Swagger Editor:

resources/swagger_editor.png

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-Swagger-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

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