radius-project / bicep-types-aws

Bicep type support for AWS
Apache License 2.0
7 stars 6 forks source link

Handling oneof representation #13

Closed vinayada1 closed 1 year ago

vinayada1 commented 1 year ago

Fixes https://dev.azure.com/azure-octo/Incubations/_workitems/edit/5711

youngbupark commented 1 year ago

How does ucp proxy handle this oneof request? all oneof properties are flat now. Is there any problem to proxy the flatten oneof properties to the actual aws request payload which cloudformation can handle?

vinayada1 commented 1 year ago

How does ucp proxy handle this oneof request? all oneof properties are flat now. Is there any problem to proxy the flatten oneof properties to the actual aws request payload which cloudformation can handle?

UCP would have earlier seen this as PropertySetA or PropertySetB or PropertySetC. But now it will see it as PropertySetA and PropertySetB and PropertySetC. We cannot validate in bicep that the user might set PropertySetA and PropertySetB when only "oneof" should be set. We will have to let this fail at server side.

rynowak commented 1 year ago

How does ucp proxy handle this oneof request? all oneof properties are flat now. Is there any problem to proxy the flatten oneof properties to the actual aws request payload which cloudformation can handle?

UCP does not need to change the payload (inside properties) since it's already in the form AWS expects 👍

youngbupark commented 1 year ago

How do we handle the following case?

https://github.com/project-radius/bicep-types-aws/blob/edfab9c109633565f549b7cdc8ba87b03921acf3/artifacts/types/AWS%3A%3AEC2%3A%3ALocalGatewayRoute.json#L43-L58