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
added Fn::Transport to Resources.resources on validation schema #8337
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8337 +/- ##
==========================================
- Coverage 88.01% 88.01% -0.01%
==========================================
Files 249 249
Lines 9306 9305 -1
==========================================
- Hits 8191 8190 -1
Misses 1115 1115
Continue to review full report at Codecov.
|
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.
@zaldanaraul great thanks for that! Please see my comment, and let me know what you think
@@ -796,6 +811,9 @@ class AwsProvider { | |||
// See also https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html | |||
Resources: { | |||
type: 'object', | |||
properties: { | |||
$ref: '#/definitions/awsCfTransform/properties', |
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.
Have you tested that it works as intended?
If I see correctly it translates to:
Resources: {
type: 'object',
properties: {
type: 'object',
properties: {...}
},
...
}
And that looks invalid (note that AJV unfortunately does not notify on unrecognized properties in Schema, it simply ignores them).
I think we don't have to introduce awsCfTransform
definition (no reusabilty use case at this point), so we can fix it simply by putting definition inline
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.
It did work in my tests. In this case, because the JSON Pointer is to awscfTransform/properties
and not just awscfTransform
, it would translate to:
Resources: {
type: 'object',
properties: {
type: 'object',
properties:
'Fn::Transform': {...}
},
...
}
However, if there is no reusability use case I'll just put the properties inline.
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.
Indeed, sorry, didn't read carefully that per path right object is pointed.
Anyway we usually do not generalize until there's a use case for it. Thanks for update!
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.
Thank you @zaldanaraul !
Closes: #8300