Skip to content

Commit d586c1d

Browse files
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs into main
2 parents 7b46097 + 989a7d0 commit d586c1d

File tree

59,221 files changed

+8900263
-139250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59,221 files changed

+8900263
-139250
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
jobs:
2+
- job: "BranchProtectionForPrivateRepo"
3+
condition: and(variables['PRIVATE'], eq(variables['System.PullRequest.TargetBranch'], 'main'))
4+
steps:
5+
- script: '>&2 echo "the branch is protected"'
6+
failOnStderr: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
jobs:
2+
- job: "NetworkValidation"
3+
condition: and(startsWith(variables['System.PullRequest.TargetBranch'], 'network-'), endsWith(variables['System.PullRequest.TargetBranch'], '-release'))
4+
continueOnError: true
5+
pool:
6+
vmImage: vs2017-win2016
7+
variables:
8+
NRP_SWAGGER_VALIDATION_OVERRIDE_PS_BRANCH: 'true'
9+
NRP_BUILD_TOOLS_SKIP_GENERATE_PS1: 'true'
10+
NRP_BUILD_TOOLS_OUTPUT_PATH: '$(System.DefaultWorkingDirectory)\Out'
11+
steps:
12+
- powershell: |
13+
& "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6.1 Tools/sn.exe" -Vr *,31bf3856ad364e35
14+
displayName: Bypass Strong Name validation
15+
- task: NodeTool@0
16+
inputs:
17+
versionSpec: '10.16.3'
18+
displayName: Install Node.js
19+
- script: npm install autorest -g
20+
displayName: Install autorest
21+
- script: git clone --depth 1 -- https://dev.azure.com/nrp-swagger/swagger-stack/_git/automation-scripts ..\BuildScripts
22+
displayName: Clone build tools
23+
- powershell: |
24+
$swgrPath = (Get-Item ".\").FullName
25+
$outputPath = $env:NRP_BUILD_TOOLS_OUTPUT_PATH
26+
New-Item -Path $outputPath -ItemType "Directory" -Force | Out-Null
27+
..\BuildScripts\Test-SwaggerRelease.ps1 -Component Network -SwaggerRepoPath $swgrPath -OutputFolder $outputPath
28+
failOnStderr: false
29+
displayName: Test Swagger updates
30+
- powershell: |
31+
Copy-Item "..\BuildScripts\.azure-pipelines\.artifactignore" -Destination "$($env:NRP_BUILD_TOOLS_OUTPUT_PATH)\.artifactignore" -Force -ErrorAction "SilentlyContinue"
32+
failOnStderr: false
33+
condition: always()
34+
displayName: Copy .artifactignore
35+
- task: PublishPipelineArtifact@0
36+
condition: always()
37+
inputs:
38+
artifactName: SwaggerTestOutput
39+
targetPath: $(NRP_BUILD_TOOLS_OUTPUT_PATH)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
jobs:
2+
- job: "ShouldSendPRToMain"
3+
condition: eq(variables['System.PullRequest.TargetBranch'], 'master')
4+
steps:
5+
- script: '>&2 echo "##vso[task.logissue type=error]Please edit the pull request to targeting new default branch main"'
6+
failOnStderr: true

.azure-pipelines/SwaggerToSDK.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
jobs:
2+
- job: "SDK"
3+
timeoutInMinutes: 180
4+
strategy:
5+
matrix:
6+
java:
7+
AZURE_SDK_REPO: azure-sdk-for-java
8+
AZURE_SDK_PARAMS: ''
9+
javascript:
10+
AZURE_SDK_REPO: azure-sdk-for-js
11+
AZURE_SDK_PARAMS: ''
12+
python:
13+
AZURE_SDK_REPO: azure-sdk-for-python
14+
AZURE_SDK_PARAMS: ''
15+
cliextension:
16+
AZURE_SDK_REPO: azure-cli-extensions
17+
AZURE_SDK_PARAMS: ''
18+
trenton:
19+
AZURE_SDK_REPO: azure-sdk-for-trenton
20+
AZURE_SDK_PARAMS: ''
21+
go:
22+
AZURE_SDK_REPO: azure-sdk-for-go
23+
AZURE_SDK_PARAMS: '-o latest'
24+
pool:
25+
vmImage: 'Ubuntu 16.04'
26+
variables:
27+
NODE_OPTIONS: '--max-old-space-size=8192'
28+
steps:
29+
- script: echo $(NODE_OPTIONS)
30+
- script: "scripts/swagger-to-sdk.sh Azure/$(AZURE_SDK_REPO) -v $(AZURE_SDK_PARAMS)"
31+
displayName: "Swagger to SDK script"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
schedules:
2+
- cron: "0 0 * * *"
3+
displayName: Daily build
4+
branches:
5+
include:
6+
- main
7+
always: true
8+
9+
pool:
10+
vmImage: 'Ubuntu-20.04'
11+
12+
variables:
13+
IMAGE_TAG_PREFIX: $[format('1.0.{0:HHm}', pipeline.startTime)]
14+
15+
steps:
16+
- task: Docker@2
17+
displayName: Login to production ACR
18+
inputs:
19+
command: login
20+
containerRegistry: $(CONTAINER_REGISTRY_SERVICE_CONNECTION)
21+
22+
- task: Docker@2
23+
displayName: Login to dogfood ACR
24+
inputs:
25+
command: login
26+
containerRegistry: $(DOGFOOD_CONTAINER_REGISTRY_SERVICE_CONNECTION)
27+
28+
- task: CopyFiles@2
29+
inputs:
30+
SourceFolder: $(Build.SourcesDirectory)
31+
contents: .git/**
32+
targetFolder: $(Build.SourcesDirectory)/scripts/datacontainer
33+
34+
- task: Docker@2
35+
displayName: Build and Push
36+
inputs:
37+
command: buildAndPush
38+
Dockerfile: scripts/datacontainer/Dockerfile
39+
repository: $(CONTAINER_REGISTRY_REPOSITORY_NAME)
40+
tags: |
41+
latest

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
### *This is an outdated document. Please refer the new [wiki](https://github.com/Azure/adx-documentation-pr/wiki) for up to date details.*
1+
### *This is an outdated document. Please refer the new [wiki](https://github.com/Azure/azure-rest-api-specs/wiki) for up to date details.*
22
([`Link your GitHub account`](https://repos.opensource.microsoft.com/) to the 'Azure' organization for access.)
33

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,62 @@
1-
### Latest improvements:
21
<i>MSFT employees can try out our new experience at <b>[OpenAPI Hub](https://aka.ms/openapiportal) </b> - one location for using our validation tools and finding your workflow.
3-
</i><br>
2+
</i>
3+
4+
### Changelog
5+
Add a changelog entry for this PR by answering the following questions:
6+
1. What's the purpose of the update?
7+
- [ ] new service onboarding
8+
- [ ] new API version
9+
- [ ] update existing version for new feature
10+
- [ ] update existing version to fix swagger quality issue in s360
11+
- [ ] Other, please clarify
12+
2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
13+
3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
14+
4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.
15+
- [ ] SDK of .NET (need service team to ensure code readiness)
16+
- [ ] SDK of Python
17+
- [ ] SDK of Java
18+
- [ ] SDK of Js
19+
- [ ] SDK of Go
20+
- [ ] PowerShell
21+
- [ ] CLI
22+
- [ ] Terraform
23+
- [ ] No refresh required for updates in this PR
24+
425
### Contribution checklist:
5-
- [ ] I have reviewed the [documentation](https://github.com/Azure/azure-rest-api-specs#basics) for the workflow.
6-
- [ ] [Validation tools](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-checklist.md#validation-tools-for-swagger-checklist) were run on swagger spec(s) and have all been fixed in this PR.
7-
- [ ] The [OpenAPI Hub](https://aka.ms/openapiportal) was used for checking validation status and next steps.
8-
### ARM API Review Checklist
9-
- [ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
10-
- adding/removing APIs.
11-
- adding/removing properties.
12-
- adding/removing API-version.
13-
- adding a new service in Azure.
14-
15-
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
16-
- [ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
17-
Please follow the link to find more details on [API review process](https://armwiki.azurewebsites.net/rp_onboarding/ResourceProviderOnboardingAPIRevieworkflow.html).
26+
- [ ] I commit to follow the [Breaking Change Policy](http://aka.ms/bcforapi) of "no breaking changes"
27+
- [ ] I have reviewed the [documentation](https://aka.ms/ameonboard) for the workflow.
28+
- [ ] [Validation tools](https://aka.ms/swaggertools) were run on swagger spec(s) and errors have all been fixed in this PR. [How to fix?](https://aka.ms/ci-fix)
29+
30+
If any further question about AME onboarding or validation tools, please view the [FAQ](https://aka.ms/faqinprreview).
31+
32+
### ARM API Review Checklist
33+
34+
> **Applicability**: :warning:
35+
>
36+
> If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.
37+
> - Change to data plane APIs
38+
> - Adding new properties
39+
> - All removals
40+
41+
Otherwise your PR may be subject to ARM review requirements. Complete the following:
42+
- [ ] Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.
43+
- Adding a new service
44+
- Adding new API(s)
45+
- Adding a new API version
46+
-[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the [wiki](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/208/OpenAPI-Hub-Adding-new-API-version).
47+
48+
- [ ] Ensure you've reviewed following [guidelines](https://aka.ms/rpguidelines) including [ARM resource provider contract](https://github.com/Azure/azure-resource-manager-rpc) and [REST guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md). Estimated time (4 hours). This is required before you can request review from ARM API Review board.
49+
50+
- [ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (*RP Manifest Approvers* team under <ins>Azure Resource Manager service</ins>) from IcM and reach out to them.
51+
52+
### Breaking Change Review Checklist
53+
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the [Breaking Change Policy](http://aka.ms/bcforapi).
54+
- [ ] Removing API(s) in a stable version
55+
- [ ] Removing properties in a stable version
56+
- [ ] Removing API version(s) in a stable version
57+
- [ ] Updating API in a stable or public preview version with Breaking Change Validation errors
58+
- [ ] Updating API(s) in public preview over 1 year (refer to [Retirement of Previews](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37683/Retirement-of-Previews))
59+
60+
**Action**: to initiate an evaluation of the breaking change, create a new intake using the [template for breaking changes](https://aka.ms/Breakingchangetemplate). Addition details on the process and office hours are on the [Breaking change Wiki](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37684/Breaking-Changes).
61+
62+
Please follow the link to find more details on [PR review process](https://aka.ms/SwaggerPRReview).

.github/comment.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
- rule:
3+
type: checkbox
4+
keywords:
5+
- "WaitForARMFeedback"
6+
booleanFilterExpression: "!(ARMSignedOff||ARMChangesRequested||Approved-OkToMerge||WaitForARMRevisit)"
7+
onCheckedLabels:
8+
- WaitForARMFeedback
9+
onCheckedComments: "Hi, @${PRAuthor} your PR are labelled with <b> WaitForARMFeedback</b>. A notification email will be sent out shortly afterwards to notify ARM review board([email protected])."
10+
11+
- rule:
12+
type: label
13+
label: BreakingChangeReviewRequired
14+
variables:
15+
openapiHub: https://portal.azure-devex-tools.com
16+
onLabeledComments: "Hi @${PRAuthor}, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow [breaking change policy](https://aka.ms/AzBreakingChangesPolicy) to request breaking change review and approval before proceeding swagger PR review. </br>**Action**: To initiate an evaluation of the breaking change, create a new intake using the [template for breaking changes](https://aka.ms/Breakingchangetemplate). Addition details on the process and office hours are on the [Breaking change Wiki](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37684/Breaking-Changes).</br> If you want to know the production traffic statistic, please see [ARM Traffic statistic](${openapiHub}/api/pr/query-traffic?pr=${owner}/${repo}/${PRNumber}&days=5). </br> If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback."
17+
18+
- rule:
19+
type: label
20+
repoAllowList:
21+
- Azure/azure-rest-api-specs-pr
22+
variables:
23+
openapiHub: https://portal.azure-devex-tools.com
24+
to: Azure/azure-rest-api-specs/main
25+
label: Approved-OkToMerge
26+
onLabeledComments: "Hi @${PRAuthor},Your PR is approved. Congratulations. </br> <li> Since your PR is in private repo (azure-rest-api-specs-pr), there won’t be PR merge. If you want to publish the PR to public repo (Azure/azure-rest-api-specs) and get it merged, pls use [OpenAPIHub Publish PR](${openapiHub}/tools/publishpullrequest?pr=${owner}/${repo}/${PRNumber}&to=${to}).</li> <li> For further guidance on how to proceed. Please refer to this [wiki](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/205/RP-Scenarios-to-Contribute-to-Swagger?anchor=**public-repository-vs.-private-repository**)</li>"
27+
28+
- rule:
29+
type: label
30+
label: NewApiVersionRequired
31+
onLabeledComments: "<b>NewApiVersionRequired reason:</b></br> </br><b>A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support. </b> </br></br> EXAMPLE: if a customer calls a service in the public cloud using <b>api-version=2020-07-27</b>, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features. "
32+
33+
- rule:
34+
type: label
35+
label: CI-FixRequiredOnFailure
36+
onLabeledComments: >-
37+
Hi @${PRAuthor}, Your PR has some issues. Please fix the CI sequentially by following the order of `Avocado, semantic validation, model validation, breaking change, lintDiff`. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.
38+
<table><tr><th>Task</th><th>How to fix</th><th>Priority</th></tr>
39+
<tr><td>Avocado</td><td>[Fix-Avocado](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/ci-fix.md#avocado)</td><td>High</td></tr>
40+
<tr><td>Semantic validation</td><td>[Fix-SemanticValidation-Error](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/ci-fix.md#semantic-validation)</td><td>High</td></tr>
41+
<tr><td>Model validation</td><td>[Fix-ModelValidation-Error](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/ci-fix.md#model-validation)</td><td>High</td></tr>
42+
<tr><td>LintDiff</td><td>[Fix-LintDiff](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/ci-fix.md#linter-validation)</td><td>high</td></tr></table>
43+
If you need further help, please feedback via [swagger feedback](https://aka.ms/swaggerfeedback).
44+
45+
- rule:
46+
type: PROpen
47+
variables:
48+
openapiHub: https://portal.azure-devex-tools.com
49+
keywords:
50+
- "I have reviewed the [documentation](https://aka.ms/ameonboard) for the workflow."
51+
onOpenedComments: "Hi, @${PRAuthor} Thanks for your PR. I am workflow bot for review process. Here are some small tips. </br> <li> Please ensure to do self-check against checklists in first PR comment.</li> <li> PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging. </li> <li> For specs comparison cross API versions, Use [API Specs Comparison Report Generator](${openapiHub}/tools/diff?pr=${owner}/${repo}/${PRNumber})</li> <li> If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. [How to fix?](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/ci-fix.md)</li></br> Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]"
52+
53+
- rule:
54+
type: PROpen
55+
onOpenedComments: "[Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks."
56+
57+
58+
- rule:
59+
type: checkbox
60+
keywords:
61+
- "update existing version to fix swagger quality issue in s360"
62+
onCheckedLabels:
63+
- FixS360
64+

.github/issue_assignment.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- rule:
3+
booleanFilterExpression: "APIStewardshipBoard-ReviewRequested"
4+
assignees:
5+
6+

0 commit comments

Comments
 (0)