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
24 changes: 12 additions & 12 deletions packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"type": "module",
"dependencies": {
"@azure-tools/typespec-ts": "workspace:^0.48.0",
"@typespec/openapi": "^1.7.0",
"@azure-tools/typespec-autorest": "^0.63.0",
"@typespec/openapi3": "^1.7.0",
"@azure-tools/typespec-azure-core": "^0.63.0",
"@azure-tools/typespec-client-generator-core": "^0.63.3",
"@azure-tools/typespec-azure-resource-manager": "^0.63.0",
"@azure-tools/typespec-azure-rulesets": "^0.63.0",
"@typespec/compiler": "^1.7.0",
"@typespec/http": "^1.7.0",
"@typespec/rest": "^0.77.0",
"@typespec/versioning": "^0.77.0",
"@typespec/json-schema": "^1.7.0",
"@typespec/openapi": "^1.8.0",
"@azure-tools/typespec-autorest": "^0.64.0",
"@typespec/openapi3": "^1.8.0",
"@azure-tools/typespec-azure-core": "^0.64.0",
"@azure-tools/typespec-client-generator-core": "^0.64.1",
"@azure-tools/typespec-azure-resource-manager": "^0.64.0",
"@azure-tools/typespec-azure-rulesets": "^0.64.0",
"@typespec/compiler": "^1.8.0",
"@typespec/http": "^1.8.0",
"@typespec/rest": "^0.78.0",
"@typespec/versioning": "^0.78.0",
"@typespec/json-schema": "^1.8.0",
"prettier": "^3.1.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function operationDeserializer(item: any): Operation {
};
}

/** Localized display information for and operation. */
/** Localized display information for an operation. */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export interface OperationDisplay {
/** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */
readonly provider?: string;
Expand Down
42 changes: 21 additions & 21 deletions packages/typespec-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
"license": "MIT",
"devDependencies": {
"@azure-rest/core-client": "^2.3.1",
"@typespec/http-specs": "0.1.0-alpha.30-dev.0",
"@typespec/spector": "0.1.0-alpha.22-dev.0",
"@typespec/spec-api": "0.1.0-alpha.12-dev.0",
"@typespec/tspd": "0.73.2",
"@azure-tools/azure-http-specs": "0.1.0-alpha.34-dev.1",
"@azure-tools/typespec-autorest": "^0.63.0",
"@azure-tools/typespec-azure-core": "^0.63.0",
"@azure-tools/typespec-azure-resource-manager": "^0.63.0",
"@azure-tools/typespec-client-generator-core": "^0.63.3",
"@typespec/http-specs": "0.1.0-alpha.31-dev.1",
"@typespec/spector": "0.1.0-alpha.23-dev.0",
"@typespec/spec-api": "0.1.0-alpha.13-dev.0",
"@typespec/tspd": "0.73.3",
"@azure-tools/azure-http-specs": "0.1.0-alpha.35-dev.9",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LRO+paging issue track: #2313

"@azure-tools/typespec-autorest": "^0.64.0",
"@azure-tools/typespec-azure-core": "^0.64.0",
"@azure-tools/typespec-azure-resource-manager": "^0.64.0",
"@azure-tools/typespec-client-generator-core": "^0.64.1",
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.6.0",
"@azure/core-lro": "^3.1.0",
Expand All @@ -87,12 +87,12 @@
"@types/mocha": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@typespec/compiler": "^1.7.0",
"@typespec/http": "^1.7.0",
"@typespec/openapi": "^1.7.0",
"@typespec/rest": "^0.77.0",
"@typespec/compiler": "^1.8.0",
"@typespec/http": "^1.8.0",
"@typespec/openapi": "^1.8.0",
"@typespec/rest": "^0.78.0",
"@typespec/ts-http-runtime": "^0.1.0",
"@typespec/versioning": "^0.77.0",
"@typespec/versioning": "^0.78.0",
"chai": "^4.3.6",
"chalk": "^4.0.0",
"cross-env": "^7.0.3",
Expand All @@ -111,13 +111,13 @@
"js-yaml": "^4.1.0"
},
"peerDependencies": {
"@azure-tools/typespec-azure-core": "^0.63.0",
"@azure-tools/typespec-client-generator-core": "^0.63.3",
"@typespec/compiler": "^1.7.0",
"@typespec/http": "^1.7.0",
"@typespec/rest": "^0.77.0",
"@typespec/versioning": "^0.77.0",
"@typespec/xml": "^0.77.0"
"@azure-tools/typespec-azure-core": "^0.64.0",
"@azure-tools/typespec-client-generator-core": "^0.64.1",
"@typespec/compiler": "^1.8.0",
"@typespec/http": "^1.8.0",
"@typespec/rest": "^0.78.0",
"@typespec/versioning": "^0.78.0",
"@typespec/xml": "^0.78.0"
},
"dependencies": {
"@azure-tools/rlc-common": "workspace:^0.48.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,42 @@ export declare interface FormDataMultiBinaryPartsMediaTypesParam {

export declare type FormDataMultiBinaryPartsParameters = FormDataMultiBinaryPartsMediaTypesParam & FormDataMultiBinaryPartsBodyParam & RequestParameters;

export declare interface FormDataOptionalParts {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve spector case for payload MultiPart: #3683

post(options: FormDataOptionalPartsParameters): StreamableMethod<FormDataOptionalParts204Response>;
}

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

export declare interface FormDataOptionalPartsBodyParam {
body: MultiPartOptionalRequest;
}

export declare interface FormDataOptionalPartsMediaTypesParam {
contentType: "multipart/form-data";
}

export declare type FormDataOptionalPartsParameters = FormDataOptionalPartsMediaTypesParam & FormDataOptionalPartsBodyParam & RequestParameters;

export declare interface FormDataWithWireName {
post(options: FormDataWithWireNameParameters): StreamableMethod<FormDataWithWireName204Response>;
}

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

export declare interface FormDataWithWireNameBodyParam {
body: MultiPartRequestWithWireName;
}

export declare interface FormDataWithWireNameMediaTypesParam {
contentType: "multipart/form-data";
}

export declare type FormDataWithWireNameParameters = FormDataWithWireNameMediaTypesParam & FormDataWithWireNameBodyParam & RequestParameters;

export declare type JsonPartRequest = FormData | Array<JsonPartRequestAddressPartDescriptor | JsonPartRequestProfileImagePartDescriptor>;

export declare interface JsonPartRequestAddressPartDescriptor {
Expand Down Expand Up @@ -370,6 +406,20 @@ export declare type MultiPartClient = Client & {
export declare interface MultiPartClientOptions extends ClientOptions {
}

export declare type MultiPartOptionalRequest = FormData | Array<MultiPartOptionalRequestIdPartDescriptor | MultiPartOptionalRequestProfileImagePartDescriptor>;

export declare interface MultiPartOptionalRequestIdPartDescriptor {
name: "id";
body: string;
}

export declare interface MultiPartOptionalRequestProfileImagePartDescriptor {
name: "profileImage";
body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream | File;
filename?: string;
contentType?: string;
}

export declare type MultiPartRequest = FormData | Array<MultiPartRequestIdPartDescriptor | MultiPartRequestProfileImagePartDescriptor>;

export declare interface MultiPartRequestIdPartDescriptor {
Expand All @@ -384,8 +434,24 @@ export declare interface MultiPartRequestProfileImagePartDescriptor {
contentType?: string;
}

export declare type MultiPartRequestWithWireName = FormData | Array<MultiPartRequestWithWireNameIdentifierPartDescriptor | MultiPartRequestWithWireNameImagePartDescriptor>;

export declare interface MultiPartRequestWithWireNameIdentifierPartDescriptor {
name: "identifier";
body: string;
}

export declare interface MultiPartRequestWithWireNameImagePartDescriptor {
name: "image";
body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream | File;
filename?: string;
contentType?: string;
}

export declare interface Routes {
(path: "/multipart/form-data/mixed-parts"): FormDataBasic;
(path: "/multipart/form-data/mixed-parts-with-wire-name"): FormDataWithWireName;
(path: "/multipart/form-data/optional-parts"): FormDataOptionalParts;
(path: "/multipart/form-data/complex-parts"): FormDataFileArrayAndBasic;
(path: "/multipart/form-data/json-part"): FormDataJsonPart;
(path: "/multipart/form-data/binary-array-parts"): FormDataBinaryArrayParts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,18 @@ export declare interface FormDataOperations {
binaryArrayParts: (body: BinaryArrayPartsRequest, options?: FormDataBinaryArrayPartsOptionalParams) => Promise<void>;
jsonPart: (body: JsonPartRequest, options?: FormDataJsonPartOptionalParams) => Promise<void>;
fileArrayAndBasic: (body: ComplexPartsRequest, options?: FormDataFileArrayAndBasicOptionalParams) => Promise<void>;
optionalParts: (body: MultiPartOptionalRequest, options?: FormDataOptionalPartsOptionalParams) => Promise<void>;
withWireName: (body: MultiPartRequestWithWireName, options?: FormDataWithWireNameOptionalParams) => Promise<void>;
basic: (body: MultiPartRequest, options?: FormDataBasicOptionalParams) => Promise<void>;
httpParts: FormDataHttpPartsOperations;
}

export declare interface FormDataOptionalPartsOptionalParams extends OperationOptions {
}

export declare interface FormDataWithWireNameOptionalParams extends OperationOptions {
}

export declare interface JsonPartRequest {
address: Address;
profileImage: FileContents | {
Expand Down Expand Up @@ -171,6 +179,15 @@ export declare class MultiPartClient {
export declare interface MultiPartClientOptionalParams extends ClientOptions {
}

export declare interface MultiPartOptionalRequest {
id?: string;
profileImage?: FileContents | {
contents: FileContents;
contentType?: string;
filename?: string;
};
}

export declare interface MultiPartRequest {
id: string;
profileImage: FileContents | {
Expand All @@ -180,4 +197,13 @@ export declare interface MultiPartRequest {
};
}

export declare interface MultiPartRequestWithWireName {
identifier: string;
image: FileContents | {
contents: FileContents;
contentType?: string;
filename?: string;
};
}

export { }
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,42 @@ export declare interface FormDataMultiBinaryPartsMediaTypesParam {

export declare type FormDataMultiBinaryPartsParameters = FormDataMultiBinaryPartsMediaTypesParam & FormDataMultiBinaryPartsBodyParam & RequestParameters;

export declare interface FormDataOptionalParts {
post(options: FormDataOptionalPartsParameters): StreamableMethod<FormDataOptionalParts204Response>;
}

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

export declare interface FormDataOptionalPartsBodyParam {
body: MultiPartOptionalRequest;
}

export declare interface FormDataOptionalPartsMediaTypesParam {
contentType: "multipart/form-data";
}

export declare type FormDataOptionalPartsParameters = FormDataOptionalPartsMediaTypesParam & FormDataOptionalPartsBodyParam & RequestParameters;

export declare interface FormDataWithWireName {
post(options: FormDataWithWireNameParameters): StreamableMethod<FormDataWithWireName204Response>;
}

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

export declare interface FormDataWithWireNameBodyParam {
body: MultiPartRequestWithWireName;
}

export declare interface FormDataWithWireNameMediaTypesParam {
contentType: "multipart/form-data";
}

export declare type FormDataWithWireNameParameters = FormDataWithWireNameMediaTypesParam & FormDataWithWireNameBodyParam & RequestParameters;

export declare type JsonPartRequest = FormData | Array<JsonPartRequestAddressPartDescriptor | JsonPartRequestProfileImagePartDescriptor>;

export declare interface JsonPartRequestAddressPartDescriptor {
Expand Down Expand Up @@ -370,6 +406,20 @@ export declare type MultiPartClient = Client & {
export declare interface MultiPartClientOptions extends ClientOptions {
}

export declare type MultiPartOptionalRequest = FormData | Array<MultiPartOptionalRequestIdPartDescriptor | MultiPartOptionalRequestProfileImagePartDescriptor>;

export declare interface MultiPartOptionalRequestIdPartDescriptor {
name: "id";
body: string;
}

export declare interface MultiPartOptionalRequestProfileImagePartDescriptor {
name: "profileImage";
body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream | File;
filename?: string;
contentType?: string;
}

export declare type MultiPartRequest = FormData | Array<MultiPartRequestIdPartDescriptor | MultiPartRequestProfileImagePartDescriptor>;

export declare interface MultiPartRequestIdPartDescriptor {
Expand All @@ -384,8 +434,24 @@ export declare interface MultiPartRequestProfileImagePartDescriptor {
contentType?: string;
}

export declare type MultiPartRequestWithWireName = FormData | Array<MultiPartRequestWithWireNameIdentifierPartDescriptor | MultiPartRequestWithWireNameImagePartDescriptor>;

export declare interface MultiPartRequestWithWireNameIdentifierPartDescriptor {
name: "identifier";
body: string;
}

export declare interface MultiPartRequestWithWireNameImagePartDescriptor {
name: "image";
body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream | File;
filename?: string;
contentType?: string;
}

export declare interface Routes {
(path: "/multipart/form-data/mixed-parts"): FormDataBasic;
(path: "/multipart/form-data/mixed-parts-with-wire-name"): FormDataWithWireName;
(path: "/multipart/form-data/optional-parts"): FormDataOptionalParts;
(path: "/multipart/form-data/complex-parts"): FormDataFileArrayAndBasic;
(path: "/multipart/form-data/json-part"): FormDataJsonPart;
(path: "/multipart/form-data/binary-array-parts"): FormDataBinaryArrayParts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,18 @@ export declare interface FormDataOperations {
binaryArrayParts: (body: BinaryArrayPartsRequest, options?: FormDataBinaryArrayPartsOptionalParams) => Promise<void>;
jsonPart: (body: JsonPartRequest, options?: FormDataJsonPartOptionalParams) => Promise<void>;
fileArrayAndBasic: (body: ComplexPartsRequest, options?: FormDataFileArrayAndBasicOptionalParams) => Promise<void>;
optionalParts: (body: MultiPartOptionalRequest, options?: FormDataOptionalPartsOptionalParams) => Promise<void>;
withWireName: (body: MultiPartRequestWithWireName, options?: FormDataWithWireNameOptionalParams) => Promise<void>;
basic: (body: MultiPartRequest, options?: FormDataBasicOptionalParams) => Promise<void>;
httpParts: FormDataHttpPartsOperations;
}

export declare interface FormDataOptionalPartsOptionalParams extends OperationOptions {
}

export declare interface FormDataWithWireNameOptionalParams extends OperationOptions {
}

export declare interface JsonPartRequest {
address: Address;
profileImage: FileContents | {
Expand Down Expand Up @@ -171,6 +179,15 @@ export declare class MultiPartClient {
export declare interface MultiPartClientOptionalParams extends ClientOptions {
}

export declare interface MultiPartOptionalRequest {
id?: string;
profileImage?: FileContents | {
contents: FileContents;
contentType?: string;
filename?: string;
};
}

export declare interface MultiPartRequest {
id: string;
profileImage: FileContents | {
Expand All @@ -180,4 +197,13 @@ export declare interface MultiPartRequest {
};
}

export declare interface MultiPartRequestWithWireName {
identifier: string;
image: FileContents | {
contents: FileContents;
contentType?: string;
filename?: string;
};
}

export { }
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function operationDeserializer(item: any): Operation {
};
}

/** Localized display information for and operation. */
/** Localized display information for an operation. */
export interface OperationDisplay {
/** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */
readonly provider?: string;
Expand Down
Loading
Loading