Skip to content

Commit 656eedd

Browse files
committed
rename schema exports with schema suffix
# Conflicts: # smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CommandGenerator.java # smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/schema/SchemaGenerator.java
1 parent 0fd8f87 commit 656eedd

21 files changed

+279
-295
lines changed

private/my-local-model-schema/src/commands/GetNumbersCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { GetNumbersRequest, GetNumbersResponse } from "../models/models_0";
8-
import { getNumbers } from "../schemas/schemas_0";
8+
import { GetNumbersSchema } from "../schemas/schemas_0";
99
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";
1010

1111
/**
@@ -89,7 +89,7 @@ export class GetNumbersCommand extends $Command
8989
})
9090
.s("XYZService", "GetNumbers", {})
9191
.n("XYZServiceClient", "GetNumbersCommand")
92-
.sc(getNumbers)
92+
.sc(GetNumbersSchema)
9393
.build() {
9494
/** @internal type navigation helper, not in runtime. */
9595
protected declare static __types: {

private/my-local-model-schema/src/commands/TradeEventStreamCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { TradeEventStreamRequest, TradeEventStreamResponse } from "../models/models_0";
8-
import { tradeEventStream } from "../schemas/schemas_0";
8+
import { TradeEventStreamSchema } from "../schemas/schemas_0";
99
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";
1010

1111
/**
@@ -97,7 +97,7 @@ export class TradeEventStreamCommand extends $Command
9797
},
9898
})
9999
.n("XYZServiceClient", "TradeEventStreamCommand")
100-
.sc(tradeEventStream)
100+
.sc(TradeEventStreamSchema)
101101
.build() {
102102
/** @internal type navigation helper, not in runtime. */
103103
protected declare static __types: {

private/my-local-model-schema/src/schemas/schemas_0.ts

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,90 +34,88 @@ import { TypeRegistry } from "@smithy/core/schema";
3434
import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
3535

3636
import {
37-
CodedThrottlingError as __CodedThrottlingError,
38-
HaltError as __HaltError,
39-
MainServiceLinkedError as __MainServiceLinkedError,
40-
MysteryThrottlingError as __MysteryThrottlingError,
41-
RetryableError as __RetryableError,
42-
XYZServiceServiceException as __XYZServiceServiceException,
37+
CodedThrottlingError,
38+
HaltError,
39+
MainServiceLinkedError,
40+
MysteryThrottlingError,
41+
RetryableError,
42+
XYZServiceServiceException,
4343
} from "../models/errors";
44-
import {
45-
XYZServiceSyntheticServiceException as __XYZServiceSyntheticServiceException,
46-
} from "../models/XYZServiceSyntheticServiceException";
44+
import { XYZServiceSyntheticServiceException } from "../models/XYZServiceSyntheticServiceException";
4745

4846
/* eslint no-var: 0 */
49-
export var alpha: StaticStructureSchema = [3, n0, _A,
47+
export var AlphaSchema: StaticStructureSchema = [3, n0, _A,
5048
0,
5149
[_i, _t],
5250
[0, 4]
5351
];
54-
export var codedThrottlingError: StaticErrorSchema = [-3, n0, _CTE,
52+
export var CodedThrottlingErrorSchema: StaticErrorSchema = [-3, n0, _CTE,
5553
{ [_e]: _c, [_hE]: 429 },
5654
[],
5755
[]
5856
];
59-
TypeRegistry.for(n0).registerError(codedThrottlingError, __CodedThrottlingError);
60-
export var getNumbersRequest: StaticStructureSchema = [3, n0, _GNR,
57+
TypeRegistry.for(n0).registerError(CodedThrottlingErrorSchema, CodedThrottlingError);
58+
export var GetNumbersRequestSchema: StaticStructureSchema = [3, n0, _GNR,
6159
0,
6260
[_bD, _bI, _fWM, _fWMi],
6361
[17, 19, 0, 0]
6462
];
65-
export var getNumbersResponse: StaticStructureSchema = [3, n0, _GNRe,
63+
export var GetNumbersResponseSchema: StaticStructureSchema = [3, n0, _GNRe,
6664
0,
6765
[_bD, _bI],
6866
[17, 19]
6967
];
70-
export var haltError: StaticErrorSchema = [-3, n0, _HE,
68+
export var HaltErrorSchema: StaticErrorSchema = [-3, n0, _HE,
7169
{ [_e]: _c },
7270
[],
7371
[]
7472
];
75-
TypeRegistry.for(n0).registerError(haltError, __HaltError);
76-
export var mainServiceLinkedError: StaticErrorSchema = [-3, n0, _MSLE,
73+
TypeRegistry.for(n0).registerError(HaltErrorSchema, HaltError);
74+
export var MainServiceLinkedErrorSchema: StaticErrorSchema = [-3, n0, _MSLE,
7775
{ [_e]: _c, [_hE]: 400 },
7876
[],
7977
[]
8078
];
81-
TypeRegistry.for(n0).registerError(mainServiceLinkedError, __MainServiceLinkedError);
82-
export var mysteryThrottlingError: StaticErrorSchema = [-3, n0, _MTE,
79+
TypeRegistry.for(n0).registerError(MainServiceLinkedErrorSchema, MainServiceLinkedError);
80+
export var MysteryThrottlingErrorSchema: StaticErrorSchema = [-3, n0, _MTE,
8381
{ [_e]: _c },
8482
[],
8583
[]
8684
];
87-
TypeRegistry.for(n0).registerError(mysteryThrottlingError, __MysteryThrottlingError);
88-
export var retryableError: StaticErrorSchema = [-3, n0, _RE,
85+
TypeRegistry.for(n0).registerError(MysteryThrottlingErrorSchema, MysteryThrottlingError);
86+
export var RetryableErrorSchema: StaticErrorSchema = [-3, n0, _RE,
8987
{ [_e]: _c },
9088
[],
9189
[]
9290
];
93-
TypeRegistry.for(n0).registerError(retryableError, __RetryableError);
94-
export var tradeEventStreamRequest: StaticStructureSchema = [3, n0, _TESR,
91+
TypeRegistry.for(n0).registerError(RetryableErrorSchema, RetryableError);
92+
export var TradeEventStreamRequestSchema: StaticStructureSchema = [3, n0, _TESR,
9593
0,
9694
[_eS],
97-
[[() => tradeEvents, 0]]
95+
[[() => TradeEventsSchema, 0]]
9896
];
99-
export var tradeEventStreamResponse: StaticStructureSchema = [3, n0, _TESRr,
97+
export var TradeEventStreamResponseSchema: StaticStructureSchema = [3, n0, _TESRr,
10098
0,
10199
[_eS],
102-
[[() => tradeEvents, 0]]
100+
[[() => TradeEventsSchema, 0]]
103101
];
104-
export var XYZServiceServiceException$: StaticErrorSchema = [-3, n0, _XYZSSE,
102+
export var XYZServiceServiceExceptionSchema: StaticErrorSchema = [-3, n0, _XYZSSE,
105103
{ [_e]: _c },
106104
[],
107105
[]
108106
];
109-
TypeRegistry.for(n0).registerError(XYZServiceServiceException$, __XYZServiceServiceException);
107+
TypeRegistry.for(n0).registerError(XYZServiceServiceExceptionSchema, XYZServiceServiceException);
110108
var __Unit = "unit" as const;
111-
export var XYZServiceSyntheticServiceException: StaticErrorSchema = [-3, _s, "XYZServiceSyntheticServiceException", 0, [], []];
112-
TypeRegistry.for(_s).registerError(XYZServiceSyntheticServiceException, __XYZServiceSyntheticServiceException);
113-
export var tradeEvents: StaticStructureSchema = [3, n0, _TE,
109+
export var XYZServiceSyntheticServiceException$: StaticErrorSchema = [-3, _s, "XYZServiceSyntheticServiceException", 0, [], []];
110+
TypeRegistry.for(_s).registerError(XYZServiceSyntheticServiceException$, XYZServiceSyntheticServiceException);
111+
export var TradeEventsSchema: StaticStructureSchema = [3, n0, _TE,
114112
{ [_st]: 1 },
115113
[_a, _b, _g],
116-
[() => alpha, () => __Unit, () => __Unit]
114+
[() => AlphaSchema, () => __Unit, () => __Unit]
117115
];
118-
export var getNumbers: StaticOperationSchema = [9, n0, _GN,
119-
0, () => getNumbersRequest, () => getNumbersResponse
116+
export var GetNumbersSchema: StaticOperationSchema = [9, n0, _GN,
117+
0, () => GetNumbersRequestSchema, () => GetNumbersResponseSchema
120118
];
121-
export var tradeEventStream: StaticOperationSchema = [9, n0, _TES,
122-
0, () => tradeEventStreamRequest, () => tradeEventStreamResponse
119+
export var TradeEventStreamSchema: StaticOperationSchema = [9, n0, _TES,
120+
0, () => TradeEventStreamRequestSchema, () => TradeEventStreamResponseSchema
123121
];
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
import {
2+
AlphaSchema,
23
CodedThrottlingError,
4+
CodedThrottlingErrorSchema,
35
GetNumbersCommand,
6+
GetNumbersRequestSchema,
7+
GetNumbersResponseSchema,
8+
GetNumbersSchema,
49
HaltError,
10+
HaltErrorSchema,
511
MainServiceLinkedError,
12+
MainServiceLinkedErrorSchema,
613
MysteryThrottlingError,
14+
MysteryThrottlingErrorSchema,
715
RetryableError,
16+
RetryableErrorSchema,
817
TradeEventStreamCommand,
18+
TradeEventStreamRequestSchema,
19+
TradeEventStreamResponseSchema,
20+
TradeEventStreamSchema,
21+
TradeEventsSchema,
922
XYZService,
1023
XYZServiceClient,
1124
XYZServiceServiceException,
12-
XYZServiceServiceException$,
25+
XYZServiceServiceExceptionSchema,
1326
XYZServiceSyntheticServiceException,
14-
alpha,
15-
codedThrottlingError,
16-
getNumbers,
17-
getNumbersRequest,
18-
getNumbersResponse,
19-
haltError,
20-
mainServiceLinkedError,
21-
mysteryThrottlingError,
22-
retryableError,
23-
tradeEventStream,
24-
tradeEventStreamRequest,
25-
tradeEventStreamResponse,
26-
tradeEvents,
2727
} from "../dist-cjs/index.js";
2828
import assert from "node:assert";
2929
// clients
3030
assert(typeof XYZServiceClient === "function");
3131
assert(typeof XYZService === "function");
3232
// commands
3333
assert(typeof GetNumbersCommand === "function");
34-
assert(typeof getNumbers === "object");
34+
assert(typeof GetNumbersSchema === "object");
3535
assert(typeof TradeEventStreamCommand === "function");
36-
assert(typeof tradeEventStream === "object");
36+
assert(typeof TradeEventStreamSchema === "object");
3737
// structural schemas
38-
assert(typeof alpha === "object");
39-
assert(typeof getNumbersRequest === "object");
40-
assert(typeof getNumbersResponse === "object");
41-
assert(typeof tradeEvents === "object");
42-
assert(typeof tradeEventStreamRequest === "object");
43-
assert(typeof tradeEventStreamResponse === "object");
38+
assert(typeof AlphaSchema === "object");
39+
assert(typeof GetNumbersRequestSchema === "object");
40+
assert(typeof GetNumbersResponseSchema === "object");
41+
assert(typeof TradeEventsSchema === "object");
42+
assert(typeof TradeEventStreamRequestSchema === "object");
43+
assert(typeof TradeEventStreamResponseSchema === "object");
4444
// errors
4545
assert(CodedThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
46-
assert(typeof codedThrottlingError === "object");
46+
assert(typeof CodedThrottlingErrorSchema === "object");
4747
assert(HaltError.prototype instanceof XYZServiceSyntheticServiceException);
48-
assert(typeof haltError === "object");
48+
assert(typeof HaltErrorSchema === "object");
4949
assert(MainServiceLinkedError.prototype instanceof XYZServiceSyntheticServiceException);
50-
assert(typeof mainServiceLinkedError === "object");
50+
assert(typeof MainServiceLinkedErrorSchema === "object");
5151
assert(MysteryThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
52-
assert(typeof mysteryThrottlingError === "object");
52+
assert(typeof MysteryThrottlingErrorSchema === "object");
5353
assert(RetryableError.prototype instanceof XYZServiceSyntheticServiceException);
54-
assert(typeof retryableError === "object");
54+
assert(typeof RetryableErrorSchema === "object");
5555
assert(XYZServiceServiceException.prototype instanceof XYZServiceSyntheticServiceException);
56-
assert(typeof XYZServiceServiceException$ === "object");
56+
assert(typeof XYZServiceServiceExceptionSchema === "object");
5757
assert(XYZServiceSyntheticServiceException.prototype instanceof Error);
5858
console.log(`XYZService index test passed.`);

private/smithy-rpcv2-cbor-schema/src/commands/EmptyInputOutputCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { EmptyStructure } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { emptyInputOutput } from "../schemas/schemas_0";
9+
import { EmptyInputOutputSchema } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -69,7 +69,7 @@ export class EmptyInputOutputCommand extends $Command
6969
})
7070
.s("RpcV2Protocol", "EmptyInputOutput", {})
7171
.n("RpcV2ProtocolClient", "EmptyInputOutputCommand")
72-
.sc(emptyInputOutput)
72+
.sc(EmptyInputOutputSchema)
7373
.build() {
7474
/** @internal type navigation helper, not in runtime. */
7575
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/Float16Command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { Float16Output } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { float16 } from "../schemas/schemas_0";
9+
import { Float16Schema } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -71,7 +71,7 @@ export class Float16Command extends $Command
7171
})
7272
.s("RpcV2Protocol", "Float16", {})
7373
.n("RpcV2ProtocolClient", "Float16Command")
74-
.sc(float16)
74+
.sc(Float16Schema)
7575
.build() {
7676
/** @internal type navigation helper, not in runtime. */
7777
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/FractionalSecondsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { FractionalSecondsOutput } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { fractionalSeconds } from "../schemas/schemas_0";
9+
import { FractionalSecondsSchema } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -71,7 +71,7 @@ export class FractionalSecondsCommand extends $Command
7171
})
7272
.s("RpcV2Protocol", "FractionalSeconds", {})
7373
.n("RpcV2ProtocolClient", "FractionalSecondsCommand")
74-
.sc(fractionalSeconds)
74+
.sc(FractionalSecondsSchema)
7575
.build() {
7676
/** @internal type navigation helper, not in runtime. */
7777
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/GreetingWithErrorsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { GreetingWithErrorsOutput } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { greetingWithErrors } from "../schemas/schemas_0";
9+
import { GreetingWithErrorsSchema } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -84,7 +84,7 @@ export class GreetingWithErrorsCommand extends $Command
8484
})
8585
.s("RpcV2Protocol", "GreetingWithErrors", {})
8686
.n("RpcV2ProtocolClient", "GreetingWithErrorsCommand")
87-
.sc(greetingWithErrors)
87+
.sc(GreetingWithErrorsSchema)
8888
.build() {
8989
/** @internal type navigation helper, not in runtime. */
9090
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/NoInputOutputCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
8-
import { noInputOutput } from "../schemas/schemas_0";
8+
import { NoInputOutputSchema } from "../schemas/schemas_0";
99

1010
/**
1111
* @public
@@ -68,7 +68,7 @@ export class NoInputOutputCommand extends $Command
6868
})
6969
.s("RpcV2Protocol", "NoInputOutput", {})
7070
.n("RpcV2ProtocolClient", "NoInputOutputCommand")
71-
.sc(noInputOutput)
71+
.sc(NoInputOutputSchema)
7272
.build() {
7373
/** @internal type navigation helper, not in runtime. */
7474
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/OperationWithDefaultsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { OperationWithDefaultsInput, OperationWithDefaultsOutput } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { operationWithDefaults } from "../schemas/schemas_0";
9+
import { OperationWithDefaultsSchema } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -137,7 +137,7 @@ export class OperationWithDefaultsCommand extends $Command
137137
})
138138
.s("RpcV2Protocol", "OperationWithDefaults", {})
139139
.n("RpcV2ProtocolClient", "OperationWithDefaultsCommand")
140-
.sc(operationWithDefaults)
140+
.sc(OperationWithDefaultsSchema)
141141
.build() {
142142
/** @internal type navigation helper, not in runtime. */
143143
protected declare static __types: {

0 commit comments

Comments
 (0)