aws / aws/aws-pdk

[FEATURE] Generate aws-sdk style client

Open
#687 1 comment 1 reaction 0 assignees View on GitHub
backlog feature-request
Dominant language
TypeScript
Stars
451
Forks
84
Avg merge
20h 3m
Merged PRs (30d)
1

Description

### Describe the feature

AWS SDK v3 client follows a pattern of Command/Input/Output. I can generate this type of client when I add this into `type_safe_api.TypeSafeApiProject` config:
```
smithyBuildOptions: {
projections: {
"ts-client": {
plugins: {
"typescript-codegen": {
package: `${apiDefaults.name}-client`,
packageVersion: "0.0.1",
},
},
},
},
maven: {
dependencies: [
"software.amazon.smithy:smithy-validation-model:1.43.0",
"software.amazon.smithy:smithy-openapi:1.43.0",
"software.amazon.smithy:smithy-aws-traits:1.43.0",
"software.amazon.smithy.typescript:smithy-typescript-codegen:0.19.0",
"software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.19.0",
"software.amazon.smithy:smithy-model:1.43.0",
"software.amazon.smithy:smithy-cli:1.43.0",
],
},
},

```

This config generates a client package in `api/model/build/smithyprojections//ts-client/typescript-codegen` but pdk/projen/nx do not see it, so it requires additional effort to publish this code to npm.
I'd like pdk to generate this code into `api/generated` similar to `generated/runtime/typescript` with all required projen configs

### Use Case

It would be more consistent with existing AWS SDK to have client generated by smithy typescript generator.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### PDK version used

0.22.49

### What languages will this feature affect?

_No response_

### Environment details (OS name and version, etc.)

macOS

Contributor guide

Open the contributing guide

Research direction

Start by examining the TypeSafeApiProject smithyBuildOptions and the generated paths under api/model/build/smithyprojections and generated/runtime/typescript. Trace how pdk, projen, and nx currently package generated code; done should mean the Smithy TypeScript client is generated under api/generated with the required project configuration and can be published to npm.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, build-system, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.