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
Copy file name to clipboardExpand all lines: codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/service/README.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
## Overview
4
4
5
5
This project extends **Smithy Kotlin** to generate **service-side code** from Smithy models, targeting the **Ktor** framework for server implementation.
6
-
It produces **complete service stubs**—including routing, serialization/deserialization, authentication, and validation—so developers can focus entirely on implementing business logic.
6
+
It produces **complete service stubs**, including routing, serialization/deserialization, authentication, and validation, so developers can focus entirely on implementing business logic.
7
7
8
8
While Ktor is the default backend, the architecture is framework-agnostic, allowing future support for other server frameworks.
9
9
@@ -67,14 +67,11 @@ First, in **this repository**, build and publish the code generator locally:
67
67
./gradlew publishToMavenLocal
68
68
```
69
69
70
-
---
71
-
72
70
### Step 2: Create a New Kotlin Project
73
71
Now, create a **new Kotlin project** where you will use the Smithy Kotlin service code generator.
74
72
75
73
From this point forward, **all steps apply to the new Kotlin project** you just created.
76
74
77
-
---
78
75
79
76
### Step 3: Configure `build.gradle.kts` in the New Project
80
77
@@ -100,7 +97,6 @@ dependencies {
100
97
}
101
98
```
102
99
103
-
---
104
100
105
101
### Step 4: Create `smithy-build.json` in the New Project
106
102
This is an example of smithy-build.json.
@@ -133,8 +129,6 @@ This is an example of smithy-build.json.
133
129
}
134
130
```
135
131
136
-
---
137
-
138
132
### Step 5: Define Your Smithy Model in the New Project
139
133
140
134
Create a `model` directory and add your `.smithy` files.
@@ -188,8 +182,6 @@ structure CustomError {
188
182
}
189
183
```
190
184
191
-
---
192
-
193
185
### Step 6: Generate the Service in the New Project
194
186
195
187
Run:
@@ -202,8 +194,6 @@ If you want to clean previously generated code:
202
194
gradle clean
203
195
```
204
196
205
-
---
206
-
207
197
### Step 7: Run the Generated Service
208
198
209
199
The generated service will be in the directory specified in `smithy-build.json` (`outputDirectory`).
@@ -213,8 +203,6 @@ gradle run
213
203
```
214
204
By default, it listens on port **8080**.
215
205
216
-
---
217
-
218
206
### Step 8: Adjust Service Configuration
219
207
220
208
You can override runtime settings (such as port or HTTP engine) using command-line arguments:
0 commit comments