-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: variadic arguments are incorrectly displayed as base type in docs #1556
Conversation
…assemblies class Signed-off-by: Sumu <sumughan@amazon.com>
…rkdown renderer Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple high level comments:
- We talked about fixing the
assembly.system.classes
to useassembly.classes
in the various lookup functions. Are you planning on doing this in a separate PR? - PR title should indicate what the specific problem was. Remember that it is the first thing customers see in the change log, so it should be as specific as possible. How exactly were variadics wrong in the docs?
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Yea, I think it'd be better to separate that from this fix. This PR would be cluttered with the snapshot updates from both fixes |
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…(for now) Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…language's transpiler Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
…dklabs/jsii-docgen into sumughan/fix-variadic-arg-docs
…languages Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
…ces, since properties cannnot be variadic Signed-off-by: Sumu <sumughan@amazon.com>
src/docgen/view/parameter.ts
Outdated
let typeschema = this.transpiledParam.typeReference.toJson(); | ||
if (this.parameter.spec.variadic) { | ||
typeschema = { | ||
formattingPattern: this.transpile.variadicOf(this.transpiledParam.typeReference.toString()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tricky to understand. Please explain with some examples.
|
||
--- | ||
|
||
##### \`deps\`<sup>Required</sup> <a name="deps" id="DependencyGroup.Initializer.parameter.deps"></a> | ||
|
||
- *Type:* <a href="/packages/constructs/v/99.99.99/api/IDependable?lang=python">IDependable</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this doesn't look right...somehow we are dropping the link. This should be:
...<a href="/packages/constructs/v/99.99.99/api/IDependable?lang=python">IDependable</a>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
Signed-off-by: github-actions <github-actions@github.com>
Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: Eli Polonsky <epolon@amazon.com>
…t function Signed-off-by: Sumu <sumughan@amazon.com>
…dklabs/jsii-docgen into sumughan/fix-variadic-arg-docs
…parameter.ts Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
Signed-off-by: Sumu <sumughan@amazon.com>
@sumupitchayan Any reason this PR is still in draft? |
@iliapolo nope, just marked as ready |
Fixes #648
Fixes issue where variadic arguments are incorrectly displayed as the base type in documentation.
Example from the original issue:
is shown as: