You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add protocol resolution priority system (#1370)
* feat(cbor): add protocol resolution priority system
* test: update test code comments
* subordinate ProtocolPriorityConfig to TypeScriptSettings
* use immutable config for protocol priority
Copy file name to clipboardExpand all lines: README.md
+15-13Lines changed: 15 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -185,19 +185,21 @@ By default, the Smithy TypeScript code generators provide the code generation fr
185
185
186
186
[`TypeScriptSettings`](smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java) contains all of the settings enabled from `smithy-build.json` and helper methods and types. The up-to-date list of top-level properties enabled for `typescript-client-codegen` can be found in `TypeScriptSettings.ArtifactType.CLIENT`.
187
187
188
-
|Setting|Required|Description|
189
-
|---|---|---|
190
-
|`package`|Yes|Name of the package in `package.json`.|
191
-
|`packageVersion`|Yes|Version of the package in `package.json`.|
192
-
|`packageDescription`|No|Description of the package in `package.json`. The default value is `${package} client`|
193
-
|`packageJson`|No|Custom `package.json` properties that will be merged with the base `package.json`. The default value is an empty object.|
194
-
|`packageManager`|No|Configured package manager for the package. The default value is `yarn`.|
195
-
|`service`|No|The Shape ID of the service to generate a client for. If not provided, the code generator will attempt to infer the service Shape ID. If there is exactly 1 service found in the model, then the service is used as the inferred Shape ID. If no services are found, then code generation fails. If more than 1 service is found, then code generation fails.|
196
-
|`protocol`|No|The Shape ID of the protocol used to generate serialization and deserialization. If not provided, the code generator will attempt to resolve the highest priority service protocol supported in code generation (registered through `TypeScriptIntegration`). If no protocols are found, code generation will use serialization and deserialization error stubs.|
197
-
|`private`|No|Whether the package is `private` in `package.json`. The default value is `false`.|
198
-
|`requiredMemberMode`|No|**NOT RECOMMENDED DUE TO BACKWARD COMPATIBILITY CONCERNS.** Sets whether members marked with the `@required` trait are allowed to be `undefined`. See more details on the risks in `TypeScriptSettings.RequiredMemberMode`. The default value is `nullable`.|
199
-
|`createDefaultReadme`|No|Whether to generate a default `README.md` for the package. The default value is `false`.|
200
-
|`useLegacyAuth`|No|**NOT RECOMMENDED, AVAILABLE ONLY FOR BACKWARD COMPATIBILITY CONCERNS.** Flag that enables using legacy auth. When in doubt, use the default identity and auth behavior (not configuring `useLegacyAuth`) as the golden path.|
|`package`|Yes| Name of the package in `package.json`. |
191
+
|`packageVersion`|Yes| Version of the package in `package.json`. |
192
+
|`packageDescription`|No| Description of the package in `package.json`. The default value is `${package} client`|
193
+
|`packageJson`|No| Custom `package.json` properties that will be merged with the base `package.json`. The default value is an empty object. |
194
+
|`packageManager`|No| Configured package manager for the package. The default value is `yarn`. |
195
+
|`service`|No| The Shape ID of the service to generate a client for. If not provided, the code generator will attempt to infer the service Shape ID. If there is exactly 1 service found in the model, then the service is used as the inferred Shape ID. If no services are found, then code generation fails. If more than 1 service is found, then code generation fails. |
196
+
|`protocol`|No| The Shape ID of the protocol used to generate serialization and deserialization. If not provided, the code generator will attempt to resolve the highest priority service protocol supported in code generation (registered through `TypeScriptIntegration`). If no protocols are found, code generation will use serialization and deserialization error stubs. |
197
+
|`private`|No| Whether the package is `private` in `package.json`. The default value is `false`. |
198
+
|`requiredMemberMode`|No|**NOT RECOMMENDED DUE TO BACKWARD COMPATIBILITY CONCERNS.** Sets whether members marked with the `@required` trait are allowed to be `undefined`. See more details on the risks in `TypeScriptSettings.RequiredMemberMode`. The default value is `nullable`. |
199
+
|`createDefaultReadme`|No| Whether to generate a default `README.md` for the package. The default value is `false`. |
200
+
|`useLegacyAuth`|No|**NOT RECOMMENDED, AVAILABLE ONLY FOR BACKWARD COMPATIBILITY CONCERNS.** Flag that enables using legacy auth. When in doubt, use the default identity and auth behavior (not configuring `useLegacyAuth`) as the golden path. |
201
+
|`serviceProtocolPriority`|No| Map of service `ShapeId` strings to lists of protocol `ShapeId` strings. Used to override protocol selection behavior. |
202
+
|`defaultProtocolPriority`|No| List of protocol `ShapeId` strings. Lower precedence than `serviceProtocolPriority` but applies to all services. |
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/DirectedTypeScriptCodegen.java
0 commit comments