Skip to content

Commit

Permalink
Keep README using old connexion.App class
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcaricio committed Apr 4, 2017
1 parent 719f685 commit 56e6197
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ path of your application (e.g ``swagger/``). Then run:
import connexion
app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app = connexion.App(__name__, specification_dir='swagger/')
app.add_api('my_api.yaml')
app.run(port=8080)
Expand Down Expand Up @@ -132,7 +132,7 @@ Connexion uses Jinja2_ to allow specification parameterization through the `argu

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/',
app = connexion.App(__name__, specification_dir='swagger/',
arguments={'global': 'global_value'})
app.add_api('my_api.yaml', arguments={'api_local': 'local_value'})
app.run(port=8080)
Expand Down Expand Up @@ -180,7 +180,7 @@ the endpoints in your specification:
from connexion.resolver import RestyResolver
app = connexion.FlaskApp(__name__)
app = connexion.App(__name__)
app.add_api('swagger.yaml', resolver=RestyResolver('api'))
.. code-block:: yaml
Expand Down Expand Up @@ -317,15 +317,15 @@ You can disable the Swagger JSON at the application level:

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/',
app = connexion.App(__name__, specification_dir='swagger/',
swagger_json=False)
app.add_api('my_api.yaml')
You can also disable it at the API level:

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app = connexion.App(__name__, specification_dir='swagger/')
app.add_api('my_api.yaml', swagger_json=False)
HTTPS Support
Expand Down Expand Up @@ -363,7 +363,7 @@ You can disable the Swagger UI at the application level:

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/',
app = connexion.App(__name__, specification_dir='swagger/',
swagger_ui=False)
app.add_api('my_api.yaml')
Expand All @@ -372,7 +372,7 @@ You can also disable it at the API level:

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app = connexion.App(__name__, specification_dir='swagger/')
app.add_api('my_api.yaml', swagger_ui=False)
Server Backend
Expand All @@ -386,15 +386,15 @@ this, set your server to ``tornado``:
import connexion
app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app = connexion.App(__name__, specification_dir='swagger/')
app.run(server='tornado', port=8080)
You can use the Flask WSGI app with any WSGI container, e.g. `using
Flask with uWSGI`_ (this is common):

.. code-block:: python
app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app = connexion.App(__name__, specification_dir='swagger/')
application = app.app # expose global WSGI application object
Set up and run the installation code:
Expand Down

0 comments on commit 56e6197

Please sign in to comment.