Skip to content

Commit

Permalink
Support collection format in modular (#1983)
Browse files Browse the repository at this point in the history
* Enable the azure core basic test for modular

* Resolve failure for export key word

* Manually update the compile error codes

* Build a separated generator function for paging function

* Update the debugging code

* Enable collection format and resolve name operation conflict

* Change the names

* Update the lint fixes

* Regen smoke-test

* Format the code

* Regenerate the integration testings

* Update the code to detect conflicts in RLC

* Remove the option because we detect in our code

* Remove useless smoke testing

* Remove the empty models.ts file

* Fix ci issue
  • Loading branch information
MaryGao authored Aug 22, 2023
1 parent b38e9e2 commit 480a399
Show file tree
Hide file tree
Showing 92 changed files with 2,718 additions and 778 deletions.
2 changes: 1 addition & 1 deletion packages/rlc-common/src/helpers/nameUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const ReservedModelNames: ReservedName[] = [
{ name: "else", reservedFor: [NameType.Parameter] },
{ name: "enum", reservedFor: [NameType.Parameter] },
{ name: "error", reservedFor: [NameType.Parameter, ...Newable] },
{ name: "export", reservedFor: [NameType.Parameter] },
{ name: "export", reservedFor: [NameType.Parameter, NameType.Operation] },
{ name: "extends", reservedFor: [NameType.Parameter] },
{ name: "false", reservedFor: [NameType.Parameter] },
{ name: "finally", reservedFor: [NameType.Parameter] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,43 +268,43 @@ export type DeployProjectParameters = DeployProjectBodyParam & RequestParameters

// @public (undocumented)
export interface Export {
post(options: ExportParameters): StreamableMethod<Export202Response | ExportDefaultResponse>;
post(options: ExportParameters): StreamableMethod<ExportOperation202Response | ExportOperationDefaultResponse>;
}

// @public
export interface ExportLogicalResponse extends HttpResponse {
// (undocumented)
status: "200";
}

// @public (undocumented)
export interface Export202Headers {
export interface ExportOperation202Headers {
"operation-location": string;
}

// @public
export interface Export202Response extends HttpResponse {
export interface ExportOperation202Response extends HttpResponse {
// (undocumented)
headers: RawHttpHeaders & Export202Headers;
headers: RawHttpHeaders & ExportOperation202Headers;
// (undocumented)
status: "202";
}

// @public (undocumented)
export interface ExportDefaultHeaders {
export interface ExportOperationDefaultHeaders {
"x-ms-error-code"?: string;
}

// @public (undocumented)
export interface ExportDefaultResponse extends HttpResponse {
export interface ExportOperationDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & ExportDefaultHeaders;
headers: RawHttpHeaders & ExportOperationDefaultHeaders;
// (undocumented)
status: string;
}

// @public
export interface ExportLogicalResponse extends HttpResponse {
// (undocumented)
status: "200";
}

// @public (undocumented)
export type ExportParameters = ExportQueryParam & RequestParameters;

Expand Down Expand Up @@ -416,7 +416,7 @@ export function getLongRunningPoller<TResult extends CreateOrUpdateLogicalRespon
export function getLongRunningPoller<TResult extends DeleteLogicalResponse | DeleteOperationDefaultResponse>(client: Client, initialResponse: DeleteOperation202Response | DeleteOperationDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;

// @public (undocumented)
export function getLongRunningPoller<TResult extends ExportLogicalResponse | ExportDefaultResponse>(client: Client, initialResponse: Export202Response | ExportDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export function getLongRunningPoller<TResult extends ExportLogicalResponse | ExportOperationDefaultResponse>(client: Client, initialResponse: ExportOperation202Response | ExportOperationDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;

// @public (undocumented)
export function getLongRunningPoller<TResult extends ImportxLogicalResponse | ImportxDefaultResponse>(client: Client, initialResponse: Importx202Response | ImportxDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
Expand Down Expand Up @@ -572,7 +572,7 @@ export function isUnexpected(response: DeleteOperation202Response | DeleteLogica
export function isUnexpected(response: ListProjects200Response | ListProjectsDefaultResponse): response is ListProjectsDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: Export202Response | ExportLogicalResponse | ExportDefaultResponse): response is ExportDefaultResponse;
export function isUnexpected(response: ExportOperation202Response | ExportLogicalResponse | ExportOperationDefaultResponse): response is ExportOperationDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: Importx202Response | ImportxLogicalResponse | ImportxDefaultResponse): response is ImportxDefaultResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
DeleteOperationDefaultResponse,
ListProjects200Response,
ListProjectsDefaultResponse,
Export202Response,
ExportDefaultResponse,
ExportOperation202Response,
ExportOperationDefaultResponse,
Importx202Response,
ImportxDefaultResponse,
Train202Response,
Expand Down Expand Up @@ -89,7 +89,9 @@ export interface Export {
/** Triggers a job to export a project's data. */
post(
options: ExportParameters
): StreamableMethod<Export202Response | ExportDefaultResponse>;
): StreamableMethod<
ExportOperation202Response | ExportOperationDefaultResponse
>;
}

export interface Importx {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
DeleteOperationDefaultResponse,
ListProjects200Response,
ListProjectsDefaultResponse,
Export202Response,
ExportOperation202Response,
ExportLogicalResponse,
ExportDefaultResponse,
ExportOperationDefaultResponse,
Importx202Response,
ImportxLogicalResponse,
ImportxDefaultResponse,
Expand Down Expand Up @@ -101,8 +101,11 @@ export function isUnexpected(
response: ListProjects200Response | ListProjectsDefaultResponse
): response is ListProjectsDefaultResponse;
export function isUnexpected(
response: Export202Response | ExportLogicalResponse | ExportDefaultResponse
): response is ExportDefaultResponse;
response:
| ExportOperation202Response
| ExportLogicalResponse
| ExportOperationDefaultResponse
): response is ExportOperationDefaultResponse;
export function isUnexpected(
response: Importx202Response | ImportxLogicalResponse | ImportxDefaultResponse
): response is ImportxDefaultResponse;
Expand Down Expand Up @@ -165,9 +168,9 @@ export function isUnexpected(
| DeleteOperationDefaultResponse
| ListProjects200Response
| ListProjectsDefaultResponse
| Export202Response
| ExportOperation202Response
| ExportLogicalResponse
| ExportDefaultResponse
| ExportOperationDefaultResponse
| Importx202Response
| ImportxLogicalResponse
| ImportxDefaultResponse
Expand Down Expand Up @@ -201,7 +204,7 @@ export function isUnexpected(
| GetDefaultResponse
| DeleteOperationDefaultResponse
| ListProjectsDefaultResponse
| ExportDefaultResponse
| ExportOperationDefaultResponse
| ImportxDefaultResponse
| TrainDefaultResponse
| GetDeploymentDefaultResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
DeleteOperation202Response,
DeleteOperationDefaultResponse,
DeleteLogicalResponse,
Export202Response,
ExportDefaultResponse,
ExportOperation202Response,
ExportOperationDefaultResponse,
ExportLogicalResponse,
Importx202Response,
ImportxDefaultResponse,
Expand Down Expand Up @@ -63,10 +63,10 @@ export async function getLongRunningPoller<
options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>
): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export async function getLongRunningPoller<
TResult extends ExportLogicalResponse | ExportDefaultResponse
TResult extends ExportLogicalResponse | ExportOperationDefaultResponse
>(
client: Client,
initialResponse: Export202Response | ExportDefaultResponse,
initialResponse: ExportOperation202Response | ExportOperationDefaultResponse,
options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>
): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export async function getLongRunningPoller<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,26 @@ export interface ListProjectsDefaultResponse extends HttpResponse {
headers: RawHttpHeaders & ListProjectsDefaultHeaders;
}

export interface Export202Headers {
export interface ExportOperation202Headers {
/** The location for monitoring the operation state. */
"operation-location": string;
}

/** The request has been accepted for processing, but processing has not yet completed. */
export interface Export202Response extends HttpResponse {
export interface ExportOperation202Response extends HttpResponse {
status: "202";
headers: RawHttpHeaders & Export202Headers;
headers: RawHttpHeaders & ExportOperation202Headers;
}

export interface ExportDefaultHeaders {
export interface ExportOperationDefaultHeaders {
/** String error code indicating what went wrong. */
"x-ms-error-code"?: string;
}

export interface ExportDefaultResponse extends HttpResponse {
export interface ExportOperationDefaultResponse extends HttpResponse {
status: string;
body: ErrorResponse;
headers: RawHttpHeaders & ExportDefaultHeaders;
headers: RawHttpHeaders & ExportOperationDefaultHeaders;
}

/** The final response for long-running export operation */
Expand Down

This file was deleted.

Loading

0 comments on commit 480a399

Please sign in to comment.