Repository navigation
Write Google style docstrings in generated clients - #981
stobrien89 wants to merge 1 commit into
Conversation
| writer, | ||
| # Google style sections, as in the Java generator. Each section line | ||
| # fits the docstring width, so wrapping keeps its indent. | ||
| (docs or f"Invokes the {operation.operation.id.name} operation.") |
There was a problem hiding this comment.
Are we converting the model docs format at some point? Generic smithy models use Commonmark so we can directly use those like this. However, AWS models use html so we'll need to convert them to markdown before writing them. We shouldn't force people to install pandoc like java codegen. Instead, we should probably write our own custom transformer or add a dependency that does it for us.
There was a problem hiding this comment.
yeah, right now the python generator just writes model docs as-is, so commonmark models are fine but aws html isn't converted yet. agree on no pandoc. I checked the aws models and they barely use any html: p, code, li, a, i, ul, b, note cover almost all of it, and most of the 175 "tags" are just placeholders like <region>. so a small converter in python seems totally doable. I'll do it as its own PR, not in this one
864859c to
d7a6a27
Compare
d7a6a27 to
3805daf
Compare
3805daf to
7ea262a
Compare
Issue #, if available:
Stacked on #978.
Description of changes:
Generated client methods now use Google style docstrings, like the Java generator, since our docs rely on that style:
This replaces the
:param plugins:line, the only RST field the generator wrote. Theendpoint_urifield doc also uses single backticks now. Model docs are unchanged. The runtime packages still use RST, which can move over separately.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.