-
Notifications
You must be signed in to change notification settings - Fork 237
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(clover): fix doc links for nested props #5508
Conversation
Dependency Review✅ No vulnerabilities or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
9f2c23d
to
292b603
Compare
@@ -576,6 +576,7 @@ export type DefaultPropType = "domain" | "secrets" | "resource_value"; | |||
export function createObjectProp( | |||
name: string, | |||
parentPath: string[], | |||
cfProp: CfObjectProperty | undefined, |
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.
What's the advantage of declaring cfProp this way instead of cfProp?: CfObjectProperty
?
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.
Oh, I did it this way so that typescript would yell at me anywhere I tried to call createObjectProp() without a cfProp argument--it forced me to make a decision in each place we create an object prop. It's not as necessary now that that initial turn is done, but doesn't hurt to show the explicit decision in the code IMO.
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.
i.e. if you don't use ?
, then you can pass undefined
but you can't omit the parameter.
292b603
to
2282328
Compare
This fixes the doc links we create for props that are part of nested definitions. In Cloud Formation, nested object definitions are placed in their own pages.
We had code trying to make this work, but it relied on
$ref
, which is stripped from most props during dereferencing. This code populates a "defName" into every prop with the name of its containing definition before the dereferencing happens.Testing