Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update yaml schema for async validation #11335

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions packages/fx-core/resource/yaml-schema/yaml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
{ "$ref": "#/definitions/teamsAppCreate" },
{ "$ref": "#/definitions/teamsAppValidateManifest" },
{ "$ref": "#/definitions/teamsAppValidateAppPackage" },
{ "$ref": "#/definitions/teamsAppValidateWithTestCases" },
{ "$ref": "#/definitions/teamsAppZipAppPackage" },
{ "$ref": "#/definitions/teamsAppUpdate" },
{ "$ref": "#/definitions/teamsAppPublishAppPackage" },
Expand Down Expand Up @@ -806,6 +807,50 @@
}
}
},
"teamsAppValidateWithTestCases": {
"type": "object",
"additionalProperties": false,
"description": "Async Valiation Tests. Refer to https://aka.ms/teamsfx-actions/teamsapp-validate for more details.",
"required": ["uses", "with"],
"properties": {
"name": {
"type": "string",
"description": "An optional name of this action."
},
"env": {
"type": "object",
"description": "Define environment variables for this action.",
"additionalProperties": {
"type": "string"
}
},
"uses": {
"type": "string",
"description": "This action will trigger async validations for the Teams app package file. Refer to https://aka.ms/teamsfx-actions/teamsapp-validate for more details.",
"const": "teamsApp/validateWithTestCases"
},
"with": {
"type": "object",
"additionalProperties": false,
"description": "Parameters for this action",
"required": ["appPackagePath"],
"properties": {
"appPackagePath": {
"type": "string",
"description": "Path to zipped Teams app package file."
},
"showMessage": {
"type": "boolean",
"description": "Show message or not."
},
"showProgressBar": {
"type": "boolean",
"description": "Show progress bar or not."
}
}
}
}
},
"teamsAppZipAppPackage": {
"type": "object",
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ export namespace AppStudioClient {
export async function submitAppValidationRequest(
teamsAppId: string,
appStudioToken: string,
timeoutSeconds = 10
timeoutSeconds = 20
): Promise<AsyncAppValidationResponse> {
const requester = createRequesterWithToken(appStudioToken, region);
requester.defaults.timeout = timeoutSeconds * 1000;
Expand Down Expand Up @@ -687,7 +687,7 @@ export namespace AppStudioClient {
export async function getAppValidationById(
appValidationId: string,
appStudioToken: string,
timeoutSeconds = 10
timeoutSeconds = 20
): Promise<AsyncAppValidationResultsResponse> {
const requester = createRequesterWithToken(appStudioToken, region);
requester.defaults.timeout = timeoutSeconds * 1000;
Expand Down