-
Notifications
You must be signed in to change notification settings - Fork 54
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
importer-rest-api-specs
- support resource generation for resources with a scoped ID segment
#3586
Conversation
Breaking ChangesNo Breaking Changes were found 👍 |
Summary of ChangesNo Breaking or Non-Breaking Changes were found 👍 |
New Resource ID Segments containing Static IdentifiersNo new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙. |
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.
Given the properties
fields are becoming optional rather than required, we should update the operationPayloads
object to make these pointers - but if we can update that then this otherwise LGTM 👍
out.createPropertiesPayload = *createPropsModel | ||
out.createPropertiesModelName = *createPropsModelName |
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.
As both ModelName
and Payload
for the Properties
object are becoming optional rather than required - we should update the operationPayloads
struct to make these pointers to signify that - which'd make this more obvious that these are optional in other parts of the codebase
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.
As discussed this change causes unwanted effects in the existing generated resources, details in #3588
if readPropsModelName != nil || readPropsModel != nil { | ||
out.readPropertiesModelName = *readPropsModelName | ||
out.readPropertiesPayload = *readPropsModel | ||
} |
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.
(as above)
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.
As discussed this change causes unwanted effects in the existing generated resources, details in #3588
Breaking ChangesNo Breaking Changes were found 👍 |
Summary of ChangesNo Breaking or Non-Breaking Changes were found 👍 |
New Resource ID Segments containing Static IdentifiersNo new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙. |
Breaking ChangesNo Breaking Changes were found 👍 |
Summary of ChangesNo Breaking or Non-Breaking Changes were found 👍 |
New Resource ID Segments containing Static IdentifiersNo new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙. |
Currently we skip resource generation if a candidate resource has a scoped resource ID segment. This PR removes that check and flips the logic for setting the Create/Read/Update Property payload instead of erroring.
These changes are required to be able to generate the resource Chaos Studio Targets. This shouldn't result in changes to the existing Data API definitions.