-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add DefaultReadmeGenerator #721
Conversation
.../main/java/software/amazon/smithy/typescript/codegen/integration/DefaultReadmeGenerator.java
Outdated
Show resolved
Hide resolved
.../main/java/software/amazon/smithy/typescript/codegen/integration/DefaultReadmeGenerator.java
Show resolved
Hide resolved
.../main/java/software/amazon/smithy/typescript/codegen/integration/DefaultReadmeGenerator.java
Outdated
Show resolved
Hide resolved
...c/test/java/software/amazon/smithy/typescript/codegen/DefaultDefaultReadmeGeneratorTest.java
Show resolved
Hide resolved
3d7075c
to
0b785f1
Compare
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_client.md.template
Outdated
Show resolved
Hide resolved
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_server.md.template
Outdated
Show resolved
Hide resolved
...c/test/java/software/amazon/smithy/typescript/codegen/DefaultDefaultReadmeGeneratorTest.java
Show resolved
Hide resolved
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_client.md.template
Outdated
Show resolved
Hide resolved
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_client.md.template
Outdated
Show resolved
Hide resolved
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_client.md.template
Outdated
Show resolved
Hide resolved
...rces/software/amazon/smithy/typescript/codegen/integration/default_readme_server.md.template
Show resolved
Hide resolved
Hi everyone, Firstly, thank you for this library; it has been incredibly useful. I'm setting up my Smithy models and noticed that the option Thanks again for your work on this library! {
"version": "1.0",
"outputDirectory": "build/",
"sources": ["models"],
"maven": {
"dependencies": [
"software.amazon.smithy:smithy-model:1.50.0",
"software.amazon.smithy:smithy-linters:1.50.0",
"software.amazon.smithy:smithy-openapi:1.50.0",
"software.amazon.smithy:smithy-openapi-traits:1.50.0",
"software.amazon.smithy:smithy-aws-apigateway-openapi:1.50.0",
"software.amazon.smithy:smithy-aws-traits:1.50.0",
"software.amazon.smithy:smithy-aws-cloudformation:1.50.0",
"software.amazon.smithy.typescript:smithy-typescript-codegen:0.21.1",
"software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.21.1"
],
"repositories": []
},
"projections": {
"configuration": {
"plugins": {
"openapi": {
"service": "com.mycorp.api#Configuration",
"apiGatewayDefaults": "2023-08-11",
"protocol": "aws.protocols#restJson1",
"apiGatewayType" : "REST",
"disableCloudFormationSubstitution": true
},
"typescript-client-codegen": {
"package": "@mycorp/smithy-configuration-api-client",
"packageVersion": "0.0.4",
"packageManager": "npm",
"createDefaultReadme": false,
"generateTypeDoc": true,
"service": "com.mycorp.api#Configuration"
},
"typescript-server-codegen": {
"package": "@mycorp/smithy-configuration-api-server",
"packageVersion": "0.0.4",
"packageManager": "npm",
"disableDefaultValidation": true,
"createDefaultReadme": true,
"generateTypeDoc": true,
"service": "com.mycorp.api#Configuration",
"packageJson": {
"files": [
"dist-*/**",
"openapi.json"
]
}
}
}
}
}
}
|
Description of changes:
(See previous closed PR #584, opening a new PR from fork repo)
createDefaultReadme
in TypeScriptSettings (defaults tofalse
)createDefaultReadme
is set to true insmithy-build.json
.smithy-typescript-ssdk-demo
)See client and server
README
examples below:weather
Description
SDK for JavaScript Weather Client for Node.js, Browser and React Native.
Provides weather forecasts.
Installing
To install the this package, simply type add or install weather
using your favorite package manager:
npm install weather
yarn add weather
pnpm add weather
Getting Started
Import
To send a request, you only need to import the
WeatherClient
andthe commands you need, for example
GetCityCommand
:Usage
To send a request, you:
send
operation on client with command object as input.destroy()
to close open connections.Async/await
We recommend using await
operator to wait for the promise returned by send operation as follows:
Async-await is clean, concise, intuitive, easy to debug and has better error handling
as compared to using Promise chains or callbacks.
Promises
You can also use Promise chaining
to execute send operation.
Promises can also be called using
.catch()
and.finally()
as follows:Callbacks
We do not recommend using callbacks because of callback hell,
but they are supported by the send operation.
Troubleshooting
When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).
@bootleg-service/server-bootleg
Description
JavaScript Server SDK for Bootleg
Installing
To install this package, simply type add or install @bootleg-service/server-bootleg
using your favorite package manager:
npm install @bootleg-service/server-bootleg
yarn add @bootleg-service/server-bootleg
pnpm add @bootleg-service/server-bootleg
Getting Started
Below is an example service handler created for the CreateVenue operation.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.