Skip to content

Commit

Permalink
support encode for modular (#2006)
Browse files Browse the repository at this point in the history
* add-encode-test-case-for-modular

* try fix modular encoding

* resolve issues in modular bytes encoding and datetime encoding

* reserve work

* reserve work

* works for duration and bytes

* works for datetime

* try fix ci

* undo unnecessary changes

* fix integration test

* fix ci

* fix integrationgit

* use auto imports

* datetime ut

* fix ci

* add more ut

* add header utcDateTime default encoding ut
  • Loading branch information
qiaozha authored Sep 11, 2023
1 parent e6a1d96 commit 34b32bd
Show file tree
Hide file tree
Showing 91 changed files with 6,181 additions and 275 deletions.
3 changes: 2 additions & 1 deletion packages/rlc-common/src/buildIndexFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ function generateRLCIndex(file: SourceFile, model: RLCModel) {
hasMultiCollection(model) ||
hasSsvCollection(model) ||
hasPipeCollection(model) ||
hasTsvCollection(model)
hasTsvCollection(model) ||
hasCsvCollection(model)
) {
file.addExportDeclarations([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,12 @@ export function _addOrUpdateBlockItemsSend(
)
.post({
...operationOptionsToRequestParameters(options),
body: { blockItems: blockItems },
body: {
blockItems: (blockItems ?? []).map((p) => ({
description: p["description"],
text: p["text"],
})),
},
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export function _publishCloudEventSend(
? uint8ArrayToString(event["dataBase64"], "base64")
: undefined,
type: event["type"],
time:
event["time"] !== undefined ? new Date(event["time"]) : undefined,
time: event["time"]?.toISOString(),
specversion: event["specversion"],
dataschema: event["dataschema"],
datacontenttype: event["datacontenttype"],
Expand Down Expand Up @@ -123,7 +122,7 @@ export function _publishCloudEventsSend(
? uint8ArrayToString(p["dataBase64"], "base64")
: undefined,
type: p["type"],
time: p["time"] !== undefined ? new Date(p["time"]) : undefined,
time: p["time"]?.toISOString(),
specversion: p["specversion"],
dataschema: p["dataschema"],
datacontenttype: p["datacontenttype"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export interface CreateOrUpdateAppComponentsOptions extends OperationOptions {
// (undocumented)
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
testId?: string;
}

Expand All @@ -48,9 +48,9 @@ export interface CreateOrUpdateServerMetricsConfigOptions extends OperationOptio
// (undocumented)
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
metrics?: Record<string, ResourceMetric>;
testId?: string;
}
Expand All @@ -61,15 +61,15 @@ export interface CreateOrUpdateTestOptions extends OperationOptions {
// (undocumented)
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
description?: string;
displayName?: string;
environmentVariables?: Record<string, string>;
inputArtifacts?: TestInputArtifacts;
keyvaultReferenceIdentityId?: string;
keyvaultReferenceIdentityType?: string;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestConfiguration;
passFailCriteria?: PassFailCriteria;
secrets?: Record<string, Secret>;
Expand Down Expand Up @@ -114,7 +114,7 @@ export interface ErrorDetails {

// @public
export interface FileInfo {
expireDateTime?: any;
expireDateTime?: Date;
fileName?: string;
fileType?: FileType;
url?: string;
Expand Down Expand Up @@ -187,8 +187,8 @@ export interface ListTestFilesOptions extends OperationOptions {

// @public (undocumented)
export interface ListTestRunsOptions extends OperationOptions {
executionFrom?: any;
executionTo?: any;
executionFrom?: Date;
executionTo?: Date;
maxpagesize?: number;
orderby?: string;
search?: string;
Expand All @@ -198,8 +198,8 @@ export interface ListTestRunsOptions extends OperationOptions {

// @public (undocumented)
export interface ListTestsOptions extends OperationOptions {
lastModifiedEndTime?: any;
lastModifiedStartTime?: any;
lastModifiedEndTime?: Date;
lastModifiedStartTime?: Date;
maxpagesize?: number;
orderby?: string;
search?: string;
Expand Down Expand Up @@ -289,9 +289,9 @@ export interface LoadTestRunClientCreateOrUpdateAppComponentsOptions extends Ope
// (undocumented)
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
testRunId?: string;
}

Expand All @@ -300,9 +300,9 @@ export interface LoadTestRunClientCreateOrUpdateServerMetricsConfigOptions exten
// (undocumented)
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
metrics?: Record<string, LoadTestRunClientResourceMetric>;
testRunId?: string;
}
Expand Down Expand Up @@ -332,7 +332,7 @@ export interface LoadTestRunClientErrorDetails {

// @public
export interface LoadTestRunClientFileInfo {
expireDateTime?: any;
expireDateTime?: Date;
fileName?: string;
fileType?: LoadTestRunClientFileType;
url?: string;
Expand Down Expand Up @@ -475,15 +475,15 @@ export type LoadTestRunClientStatus = string;
export interface LoadTestRunClientTest {
certificate?: LoadTestRunClientCertificateMetadata;
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
description?: string;
displayName?: string;
environmentVariables?: Record<string, string>;
readonly inputArtifacts?: LoadTestRunClientTestInputArtifacts;
keyvaultReferenceIdentityId?: string;
keyvaultReferenceIdentityType?: string;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestRunClientLoadTestConfiguration;
passFailCriteria?: LoadTestRunClientPassFailCriteria;
secrets?: Record<string, LoadTestRunClientSecret>;
Expand All @@ -504,21 +504,21 @@ export interface LoadTestRunClientTestInputArtifacts {
export interface LoadTestRunClientTestRun {
certificate?: LoadTestRunClientCertificateMetadata;
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
description?: string;
displayName?: string;
readonly duration?: number;
readonly endDateTime?: any;
readonly endDateTime?: Date;
environmentVariables?: Record<string, string>;
readonly errorDetails?: LoadTestRunClientErrorDetails[];
readonly executedDateTime?: any;
readonly executedDateTime?: Date;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestRunClientLoadTestConfiguration;
passFailCriteria?: LoadTestRunClientPassFailCriteria;
readonly portalUrl?: string;
secrets?: Record<string, LoadTestRunClientSecret>;
readonly startDateTime?: any;
readonly startDateTime?: Date;
readonly status?: LoadTestRunClientStatus;
readonly subnetId?: string;
readonly testArtifacts?: LoadTestRunClientTestRunArtifacts;
Expand Down Expand Up @@ -699,15 +699,15 @@ export interface StopTestRunOptions extends OperationOptions {
export interface Test {
certificate?: CertificateMetadata;
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
description?: string;
displayName?: string;
environmentVariables?: Record<string, string>;
readonly inputArtifacts?: TestInputArtifacts;
keyvaultReferenceIdentityId?: string;
keyvaultReferenceIdentityType?: string;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestConfiguration;
passFailCriteria?: PassFailCriteria;
secrets?: Record<string, Secret>;
Expand All @@ -719,9 +719,9 @@ export interface Test {
export interface TestAppComponents {
components: Record<string, AppComponent>;
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
readonly testId?: string;
}

Expand All @@ -738,21 +738,21 @@ export interface TestInputArtifacts {
export interface TestRun {
certificate?: CertificateMetadata;
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
description?: string;
displayName?: string;
readonly duration?: number;
readonly endDateTime?: any;
readonly endDateTime?: Date;
environmentVariables?: Record<string, string>;
readonly errorDetails?: ErrorDetails[];
readonly executedDateTime?: any;
readonly executedDateTime?: Date;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestConfiguration;
passFailCriteria?: PassFailCriteria;
readonly portalUrl?: string;
secrets?: Record<string, Secret>;
readonly startDateTime?: any;
readonly startDateTime?: Date;
readonly status?: Status;
readonly subnetId?: string;
readonly testArtifacts?: TestRunArtifacts;
Expand Down Expand Up @@ -783,22 +783,22 @@ export interface TestRunOptions extends OperationOptions {
certificate?: LoadTestRunClientCertificateMetadata;
contentType?: string;
createdBy?: string;
createdDateTime?: any;
createdDateTime?: Date;
description?: string;
displayName?: string;
duration?: number;
endDateTime?: any;
endDateTime?: Date;
environmentVariables?: Record<string, string>;
errorDetails?: LoadTestRunClientErrorDetails[];
executedDateTime?: any;
executedDateTime?: Date;
lastModifiedBy?: string;
lastModifiedDateTime?: any;
lastModifiedDateTime?: Date;
loadTestConfiguration?: LoadTestRunClientLoadTestConfiguration;
oldTestRunId?: string;
passFailCriteria?: LoadTestRunClientPassFailCriteria;
portalUrl?: string;
secrets?: Record<string, LoadTestRunClientSecret>;
startDateTime?: any;
startDateTime?: Date;
status?: LoadTestRunClientStatus;
subnetId?: string;
testArtifacts?: LoadTestRunClientTestRunArtifacts;
Expand Down Expand Up @@ -835,9 +835,9 @@ export interface TestRunStatistics {
// @public
export interface TestServerMetricConfig {
readonly createdBy?: string;
readonly createdDateTime?: any;
readonly createdDateTime?: Date;
readonly lastModifiedBy?: string;
readonly lastModifiedDateTime?: any;
readonly lastModifiedDateTime?: Date;
metrics?: Record<string, ResourceMetric>;
readonly testId?: string;
}
Expand Down
Loading

0 comments on commit 34b32bd

Please sign in to comment.