Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the import statements for the cookbook snippets #1805

Conversation

MatthiasDurivet
Copy link
Contributor

Updates the import statements on https://connexion.readthedocs.io/en/stable/cookbook.html

A few of the import statements were missing, or didn't match the example code because they imported at the wrong depth.
This should make the code in the cookbook copy-pasteable.


from asgi_framework import App
from connexion import ConnexionMiddleware
from connexion.lifecycle import ConnexionRequest, ConnexionResponse
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there's a hidden reason to import these classes (?) they were not used in the snippet.

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MatthiasDurivet

There needs to be an empty newline at the start of each code block though. You can see that the rendering fails in the test build.

Locally, you can test this by running make html from the /docs directory.

docs/cookbook.rst Outdated Show resolved Hide resolved
docs/cookbook.rst Outdated Show resolved Hide resolved
docs/cookbook.rst Outdated Show resolved Hide resolved
@RobbeSneyders RobbeSneyders merged commit 563fbf8 into spec-first:main Nov 19, 2023
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants