Skip to content

Commit 22d1498

Browse files
AllanZhengYPsrchase
authored andcommitted
strip internal API, endpoint and test files from API reference (smithy-lang#337)
* mark clients internal configs * docs: strip internal API, endpoint and test files in reference
1 parent 93d062b commit 22d1498

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServiceGenerator.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,37 +213,46 @@ private void generateClientDefaults() {
213213

214214
writer.addImport("HashConstructor", "__HashConstructor", "@aws-sdk/types");
215215
writer.writeDocs("A constructor for a class implementing the @aws-sdk/types.Hash interface \n"
216-
+ "that computes the SHA-256 HMAC or checksum of a string or binary buffer.");
216+
+ "that computes the SHA-256 HMAC or checksum of a string or binary buffer.\n"
217+
+ "@internal");
217218
writer.write("sha256?: __HashConstructor;\n");
218219

219220
writer.addImport("UrlParser", "__UrlParser", "@aws-sdk/types");
220-
writer.writeDocs("The function that will be used to convert strings into HTTP endpoints.");
221+
writer.writeDocs("The function that will be used to convert strings into HTTP endpoints.\n"
222+
+ "@internal");
221223
writer.write("urlParser?: __UrlParser;\n");
222224

223-
writer.writeDocs("A function that can calculate the length of a request body.");
225+
writer.writeDocs("A function that can calculate the length of a request body.\n"
226+
+ "@internal");
224227
writer.write("bodyLengthChecker?: (body: any) => number | undefined;\n");
225228

226229
writer.addImport("StreamCollector", "__StreamCollector", "@aws-sdk/types");
227-
writer.writeDocs("A function that converts a stream into an array of bytes.");
230+
writer.writeDocs("A function that converts a stream into an array of bytes.\n"
231+
+ "@internal");
228232
writer.write("streamCollector?: __StreamCollector;\n");
229233

230234
// Note: Encoder and Decoder are both used for base64 and UTF.
231235
writer.addImport("Encoder", "__Encoder", "@aws-sdk/types");
232236
writer.addImport("Decoder", "__Decoder", "@aws-sdk/types");
233237

234-
writer.writeDocs("The function that will be used to convert a base64-encoded string to a byte array");
238+
writer.writeDocs("The function that will be used to convert a base64-encoded string to a byte array.\n"
239+
+ "@internal");
235240
writer.write("base64Decoder?: __Decoder;\n");
236241

237-
writer.writeDocs("The function that will be used to convert binary data to a base64-encoded string");
242+
writer.writeDocs("The function that will be used to convert binary data to a base64-encoded string.\n"
243+
+ "@internal");
238244
writer.write("base64Encoder?: __Encoder;\n");
239245

240-
writer.writeDocs("The function that will be used to convert a UTF8-encoded string to a byte array");
246+
writer.writeDocs("The function that will be used to convert a UTF8-encoded string to a byte array.\n"
247+
+ "@internal");
241248
writer.write("utf8Decoder?: __Decoder;\n");
242249

243-
writer.writeDocs("The function that will be used to convert binary data to a UTF-8 encoded string");
250+
writer.writeDocs("The function that will be used to convert binary data to a UTF-8 encoded string.\n"
251+
+ "@internal");
244252
writer.write("utf8Encoder?: __Encoder;\n");
245253

246-
writer.writeDocs("The runtime environment");
254+
writer.writeDocs("The runtime environment.\n"
255+
+ "@internal");
247256
writer.write("runtime?: string;\n");
248257

249258
writer.writeDocs("Disable dyanamically changing the endpoint of the client based on the hostPrefix \n"

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
"exclude": [
2020
"**/node_modules/**",
2121
"**/*.spec.ts",
22-
"./protocols/*.ts",
23-
"./e2e/*.ts",
24-
"./endpoints.ts"
22+
"**/protocols/*.ts",
23+
"**/e2e/*.ts",
24+
"**/endpoints.ts"
2525
],
2626
"excludeNotExported": true,
2727
"excludePrivate": true,
2828
"hideGenerator": true,
2929
"ignoreCompilerErrors": true,
3030
"includeDeclarations": true,
31+
"stripInternal": true,
3132
"readme": "./README.md",
3233
"mode": "file",
3334
"out": "./docs",

0 commit comments

Comments
 (0)