Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support invokes with non-object outputs, via wrapping (#3165)
Resolves #3147 If we're generating response properties and the resolved schema has no properties but is a primitive/array output, we include it as a special property so invokes can be generated. Ideally we'd just represent the response as a primitive type without the wrapping magic property, using `FunctionSpec.ReturnType`, but pulumi/pulumi#15738 and pulumi/pulumi#15739 prevent this. Unfortunately, this change required adding a third boolean to `genProperties` to limit this new case to function responses only. Happy to incorporate suggestions to model this better. This is a simple program that demonstrates one of the new invokes. ```ts import * as app from "@pulumi/azure-native/app"; const id = app.getCustomDomainVerificationIdOutput(); export const customDomainVerificationId = id; export const customDomainVerificationIdValue = id.value; ``` Output: ``` + customDomainVerificationId : { + value: "B11..." } + customDomainVerificationIdValue: "B11..." ```
- Loading branch information
Showing
153 changed files
with
7,419 additions
and
49 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.