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

Generate a better OpenAPI description from docstring #462

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

antoine-roux
Copy link

@antoine-roux antoine-roux commented Jul 31, 2023

As this PR is a minor one, I'm skipping the issue creation. Please forgive me...

Context

If a docstring is well indented (often automatically by black or other) the generated description for OpenAPI will contains indentation, which is not desirable. Markdown will interpret this indentation as code block:

        """Summary

        Description line 1

        Description line 2
        """

generates

Description line 1\n\n        Description line 2

with this PR, the generated MD would be

Description line 1\n\nDescription line 2

Have a nice day :)
Antoine

@greyli
Copy link
Member

greyli commented Aug 9, 2023

Hi, thanks for working on this! Could you add some tests?

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