-
-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to install prerequisites in example READMEs
Add server url /openapi to JWT example Add TODO to SQLAlchemy example, does not work with current versions Correct name of module in v3 instructions Fixes #1948, #1987
- Loading branch information
1 parent
e4e64d7
commit 37e84aa
Showing
16 changed files
with
259 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
======================= | ||
================ | ||
JWT Auth Example | ||
======================= | ||
================ | ||
|
||
.. note:: | ||
|
||
jwt is not supported by swagger 2.0: https://swagger.io/docs/specification/2-0/authentication/ | ||
|
||
Running: | ||
Preparing | ||
--------- | ||
|
||
Create a new virtual environment and install the required libraries | ||
with these commands: | ||
|
||
.. code-block:: bash | ||
$ python -m venv my-venv | ||
$ source my-venv/bin/activate | ||
$ pip install 'connexion[flask,swagger-ui,uvicorn]>=3.1.0' | ||
$ pip install -r requirements.txt | ||
Running | ||
------- | ||
|
||
Launch the connexion server with this command: | ||
|
||
.. code-block:: bash | ||
$ python app.py | ||
Now open your browser and go to http://localhost:8080/ui/ to see the Swagger UI. | ||
Now open your browser and view the Swagger UI for the specification file: | ||
|
||
* http://localhost:8080/openapi/ui/ for the OpenAPI 3 spec | ||
|
||
Use endpoint **/auth** to generate JWT token, copy it, then click **Authorize** button and paste the token. | ||
Now you can use endpoint **/secret** to check authentication. | ||
Now you can use endpoint **/secret** to check authentication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
..[swagger-ui] | ||
python-jose[cryptography] | ||
Flask>=0.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
===================== | ||
========================== | ||
MethodViewResolver Example | ||
===================== | ||
========================== | ||
|
||
Running: | ||
Preparing | ||
--------- | ||
|
||
Create a new virtual environment and install the required libraries | ||
with these commands: | ||
|
||
.. code-block:: bash | ||
$ python -m venv my-venv | ||
$ source my-venv/bin/activate | ||
$ pip install 'connexion[flask,swagger-ui,uvicorn]>=3.1.0' | ||
Running | ||
------- | ||
|
||
Launch the connexion server with this command: | ||
|
||
.. code-block:: bash | ||
$ python app.py | ||
Now open your browser and go to http://localhost:9090/v1.0/ui/ to see the Swagger UI. | ||
Now open your browser and view the Swagger UI for the specification file: | ||
|
||
* http://localhost:8080/openapi/ui/ for the OpenAPI 3 spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.