Files
connexion/examples/openapi3/apikey
Christian Clauss 6c4f99051d Upgrade syntax for Python >= 3.6 (#1383)
* pyupgrade --py36-plus **/*.py

* Fix indentation

* Fix indentation
2021-07-04 20:04:22 +02:00
..

=======================
API Key Example
=======================

Running:

.. code-block:: bash

    $ sudo pip3 install --upgrade connexion[swagger-ui]  # install Connexion from PyPI
    $ ./app.py

Now open your browser and go to http://localhost:8080/ui/ to see the Swagger UI.

The hardcoded apikey is `asdf1234567890`.

Test it out (in another terminal):

.. code-block:: bash

    $ curl -H 'X-Auth: asdf1234567890' http://localhost:8080/secret