Forum Discussion

mloskot's avatar
Occasional Visitor
3 years ago

Generating Python client with valid docstrings

I'm using the currently latest swagger-codegen-cli-3.0.26.jar to generate Python client for my API.

Then, I'm using Sphinxa to generate the client API reference in HTML format.

The toolset invocation is pretty standard:


sphinx-apidoc -f -o docs-python\_modules -e -P python\myclient
docs-python\make.bat clean
docs-python\make.bat html


with a bunch of extensions in my `` for Sphinx:


extensions = [


The `make.bat html` command outputs lots of warnings like these:


WARNING: Block quote ends without a blank line; unexpected unindent.
WARNING: Unexpected indentation.


I noticed the generator outputs docstrings which are not entirely valid.


It also includes lots of the directives like `# noqa: E501` which are dedicated for the Python linters.


Is there any way to control the docstring flavour or format that `swagger-codegen` outputs?

If the above looks like a bug, is the right place to report it?

No RepliesBe the first to reply