From 6ec1969790a152416309c9d76bbcae88dd3d0bb6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 24 Dec 2020 05:16:05 +0000 Subject: [PATCH] CodeGen from PR 11585 in Azure/azure-rest-api-specs Adding new api version to devops RP (#11585) * Initial commit as per PR review * Actual changes to api spec for new version * Switching to multi-api build for python * Fix python spec to correct namespaces in multiapi mode * Revert changes to python generation * Add systemdata * Fix the path for sys data reference * Fix path once more * remove additional properties after including systemdata * Remove more addtional properties * Move system data to root --- .../2019-07-01-preview/Microsoft.DevOps.json | 2 +- .../2020-07-13-preview/Microsoft.DevOps.json | 345 ++++++++++++++++++ 2 files changed, 346 insertions(+), 1 deletion(-) create mode 100644 schemas/2020-07-13-preview/Microsoft.DevOps.json diff --git a/schemas/2019-07-01-preview/Microsoft.DevOps.json b/schemas/2019-07-01-preview/Microsoft.DevOps.json index a28f21bcb9..ff0081e6e8 100644 --- a/schemas/2019-07-01-preview/Microsoft.DevOps.json +++ b/schemas/2019-07-01-preview/Microsoft.DevOps.json @@ -292,4 +292,4 @@ "description": "Reference to an Azure DevOps Project." } } -} \ No newline at end of file +} diff --git a/schemas/2020-07-13-preview/Microsoft.DevOps.json b/schemas/2020-07-13-preview/Microsoft.DevOps.json new file mode 100644 index 0000000000..b895c2e216 --- /dev/null +++ b/schemas/2020-07-13-preview/Microsoft.DevOps.json @@ -0,0 +1,345 @@ +{ + "id": "https://schema.management.azure.com/schemas/2020-07-13-preview/Microsoft.DevOps.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.DevOps", + "description": "Microsoft DevOps Resource Types", + "resourceDefinitions": { + "pipelines": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-07-13-preview" + ] + }, + "location": { + "type": "string", + "description": "Resource Location" + }, + "name": { + "type": "string", + "description": "The name of the Pipeline resource in ARM." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PipelineProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Custom properties of a Pipeline." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource Tags" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.DevOps/pipelines" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.DevOps/pipelines" + } + }, + "definitions": { + "Authorization": { + "type": "object", + "properties": { + "authorizationType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "personalAccessToken" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of authorization." + }, + "parameters": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authorization parameters corresponding to the authorization type." + } + }, + "required": [ + "authorizationType" + ], + "description": "Authorization info used to access a resource (like code repository)." + }, + "AzurePipelineProperties": { + "type": "object", + "properties": { + "organization": { + "oneOf": [ + { + "$ref": "#/definitions/OrganizationReference" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Reference to an Azure DevOps Organization." + }, + "pipelineType": { + "type": "string", + "enum": [ + "azurePipeline" + ] + }, + "project": { + "oneOf": [ + { + "$ref": "#/definitions/ProjectReference" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Reference to an Azure DevOps Project." + } + }, + "required": [ + "organization", + "pipelineType", + "project" + ], + "description": "Custom properties of a Azure Pipeline." + }, + "BootstrapConfiguration": { + "type": "object", + "properties": { + "sourceRepository": { + "oneOf": [ + { + "$ref": "#/definitions/CodeRepository" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Repository containing the source code for a pipeline." + }, + "template": { + "oneOf": [ + { + "$ref": "#/definitions/PipelineTemplate" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Template used to bootstrap the pipeline." + } + }, + "required": [ + "template" + ], + "description": "Configuration used to bootstrap a Pipeline." + }, + "CodeRepository": { + "type": "object", + "properties": { + "authorization": { + "oneOf": [ + { + "$ref": "#/definitions/Authorization" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authorization info used to access a resource (like code repository)." + }, + "defaultBranch": { + "type": "string", + "description": "Default branch used to configure Continuous Integration (CI) in the pipeline." + }, + "id": { + "type": "string", + "description": "Unique immutable identifier of the code repository." + }, + "properties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Repository-specific properties." + }, + "repositoryType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "gitHub", + "vstsGit" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of code repository." + } + }, + "required": [ + "defaultBranch", + "id", + "repositoryType" + ], + "description": "Repository containing the source code for a pipeline." + }, + "GithubWorkflowProperties": { + "type": "object", + "properties": { + "pipelineType": { + "type": "string", + "enum": [ + "githubWorkflow" + ] + }, + "repository": { + "oneOf": [ + { + "$ref": "#/definitions/CodeRepository" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Repository containing the source code for a pipeline." + } + }, + "required": [ + "pipelineType", + "repository" + ], + "description": "Custom properties of an Github Pipeline." + }, + "OrganizationReference": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Azure DevOps Organization." + } + }, + "required": [ + "name" + ], + "description": "Reference to an Azure DevOps Organization." + }, + "PipelineProperties": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/AzurePipelineProperties" + }, + { + "$ref": "#/definitions/GithubWorkflowProperties" + } + ], + "properties": { + "bootstrapConfiguration": { + "oneOf": [ + { + "$ref": "#/definitions/BootstrapConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration used to bootstrap a Pipeline." + } + }, + "required": [ + "bootstrapConfiguration" + ], + "description": "Custom properties of a Pipeline." + }, + "PipelineTemplate": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the pipeline template." + }, + "parameters": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of input parameters used in the pipeline template." + } + }, + "required": [ + "id" + ], + "description": "Template used to bootstrap the pipeline." + }, + "ProjectReference": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Azure DevOps Project." + } + }, + "required": [ + "name" + ], + "description": "Reference to an Azure DevOps Project." + } + } +}