Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@azure-tools/typespec-autorest": "^0.68.0",
"@typespec/openapi3": "^1.12.0",
"@azure-tools/typespec-azure-core": "^0.68.0",
"@azure-tools/typespec-client-generator-core": "^0.68.2",
"@azure-tools/typespec-client-generator-core": "^0.68.3",
"@azure-tools/typespec-azure-resource-manager": "^0.68.0",
"@azure-tools/typespec-azure-rulesets": "^0.68.0",
"@typespec/compiler": "^1.12.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/typespec-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
"@typespec/spector": "0.1.0-dev.4",
"@typespec/spec-api": "0.1.0-dev.3",
"@typespec/tspd": "0.74.2",
"@azure-tools/azure-http-specs": "0.1.0-alpha.41-dev.1",
"@azure-tools/azure-http-specs": "0.1.0-alpha.41-dev.2",
"@azure-tools/typespec-autorest": "^0.68.0",
"@azure-tools/typespec-azure-core": "^0.68.0",
"@azure-tools/typespec-azure-resource-manager": "^0.68.0",
"@azure-tools/typespec-client-generator-core": "^0.68.2",
"@azure-tools/typespec-client-generator-core": "^0.68.3",
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.6.0",
"@azure/core-lro": "^3.1.0",
Expand Down Expand Up @@ -112,7 +112,7 @@
},
"peerDependencies": {
"@azure-tools/typespec-azure-core": "^0.68.0",
"@azure-tools/typespec-client-generator-core": "^0.68.2",
"@azure-tools/typespec-client-generator-core": "^0.68.3",
"@typespec/compiler": "^1.12.0",
"@typespec/http": "^1.12.0",
"@typespec/rest": "^0.82.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ describe("Usage Client", () => {
.put({ body: { name: "name", desc: "desc" } });
assert.strictEqual(result.status, "204");
});

it("should put namespace model in operation", async () => {
const result = await client
.path("/azure/client-generator-core/usage/namespaceModelSerializable")
.put({ body: { name: "test" } });
assert.strictEqual(result.status, "204");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ export declare interface ModelInReadOnlyPropertyBodyParam {

export declare type ModelInReadOnlyPropertyParameters = ModelInReadOnlyPropertyBodyParam & RequestParameters;

export declare interface NamespaceModelSerializable {
put(options: NamespaceModelSerializableParameters): StreamableMethod<NamespaceModelSerializable204Response>;
}

export declare interface NamespaceModelSerializable204Response extends HttpResponse {
status: "204";
}

export declare interface NamespaceModelSerializableBodyParam {
body: unknown;
}

export declare type NamespaceModelSerializableParameters = NamespaceModelSerializableBodyParam & RequestParameters;

export declare interface OrphanModelSerializable {
put(options: OrphanModelSerializableParameters): StreamableMethod<OrphanModelSerializable204Response>;
}
Expand Down Expand Up @@ -95,6 +109,7 @@ export declare interface Routes {
(path: "/azure/client-generator-core/usage/outputToInputOutput"): OutputToInputOutput;
(path: "/azure/client-generator-core/usage/modelInReadOnlyProperty"): ModelInReadOnlyProperty;
(path: "/azure/client-generator-core/usage/orphanModelSerializable"): OrphanModelSerializable;
(path: "/azure/client-generator-core/usage/namespaceModelSerializable"): NamespaceModelSerializable;
}

export declare type UsageClient = Client & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ describe("Azure ClientGeneratorCore Usage Client", () => {
});
assert.isUndefined(result);
});

it("should put namespace model in operation", async () => {
const result = await client.namespaceModelSerializable({
name: "test"
});
assert.isUndefined(result);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ export { isRestError }
export declare interface ModelInReadOnlyPropertyOptionalParams extends OperationOptions {
}

export declare interface NamespaceModel {
name: string;
}

export declare interface NamespaceModelSerializableOptionalParams extends OperationOptions {
}

export declare interface NestedNamespaceModel {
value: string;
}

export declare interface OrphanModel {
modelName: string;
description: string;
Expand Down Expand Up @@ -45,6 +56,7 @@ export declare class UsageClient {
private _client;
readonly pipeline: Pipeline;
constructor(options?: UsageClientOptionalParams);
namespaceModelSerializable(body: any, options?: NamespaceModelSerializableOptionalParams): Promise<void>;
orphanModelSerializable(body: any, options?: OrphanModelSerializableOptionalParams): Promise<void>;
modelInReadOnlyProperty(body: RoundTripModel, options?: ModelInReadOnlyPropertyOptionalParams): Promise<RoundTripModel>;
outputToInputOutput(options?: OutputToInputOutputOptionalParams): Promise<OutputModel>;
Expand Down
Loading
Loading