Skip to content

Commit

Permalink
Merge pull request #1 from Azure/master
Browse files Browse the repository at this point in the history
Merge Master
  • Loading branch information
david-msft authored Dec 28, 2020
2 parents c05f4de + bcd4179 commit a5c1e62
Show file tree
Hide file tree
Showing 267 changed files with 24,930 additions and 10,857 deletions.
6,015 changes: 0 additions & 6,015 deletions .azure-pipelines-preproduction/package-lock.json

This file was deleted.

47 changes: 0 additions & 47 deletions .azure-pipelines-preproduction/package.json

This file was deleted.

16 changes: 5 additions & 11 deletions .github/comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@
- WaitForARMFeedback
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(armapireview@microsoft.com). cc @${PRAssignee} "

- rule:
type: checkbox
variables:
openapiHub: https://portal.azure-devex-tools.com
keywords:
- "I have reviewed the [documentation](https://aka.ms/ameonboard) for the workflow."
onCheckedComments: "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/master/documentation/ci-fix.md)</li></br> Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com"

- rule:
type: label
label: BreakingChangeReviewRequired
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 think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ma/swaggerfeedback."
variables:
openapiHub: https://portal.azure-devex-tools.com
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.ma/swaggerfeedback."

- rule:
type: label
Expand All @@ -44,9 +38,9 @@
- rule:
type: PROpen
variables:
openapiHub: https://openapihub.test.azure-devex-tools.com/
openapiHub: https://portal.azure-devex-tools.com
keywords:
- "I have reviewed the [documentation](https://aka.ms/ameonboard) for the workflow."
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 cross api-version diff. See [OpenAPI Hub Diff](${openapiHub}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/master/documentation/ci-fix.md)</li></br> Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com"
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/master/documentation/ci-fix.md)</li></br> Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com"


6 changes: 6 additions & 0 deletions .github/pull_request_assignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
- "specification/testbase/**"
reviewers:
- PhoenixHe-msft

- rule:
paths:
- "specification/servicelinker/**"
reviewers:
- PhoenixHe-msft

- rule:
paths:
Expand Down
4 changes: 4 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,7 @@ paramref
PARAVIRTUAL
partnertopic
Passthrough
passwd
patternanyentities
patternrule
patternrules
Expand All @@ -1259,6 +1260,7 @@ Phonetik
phplogging
phraselist
phraselists
Pids
pipelineruns
PITR
pixelated
Expand Down Expand Up @@ -1699,6 +1701,7 @@ subfolders
subinquireditemcount
sublist
sublists
submount
subnames
subnet
subnet's
Expand All @@ -1722,6 +1725,7 @@ subword
subwords
sudoer
suggesters
suid
Superfresh
superset
supportedimages
Expand Down
33 changes: 12 additions & 21 deletions documentation/Semantic-and-Model-Violations-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ This document lists the set of automated rules that can be validated against swa
| [INVALID_RESPONSE_CODE](#INVALID_RESPONSE_CODE) | |
| [INVALID_RESPONSE_BODY](#INVALID_RESPONSE_BODY) | |
| [MISSING_REQUIRED_PARAMETER](#MISSING_REQUIRED_PARAMETER) | |
| [KEYWORD_TYPE_EXPECTED](#KEYWORD_TYPE_EXPECTED) | |
| [READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST](#READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST) | |
| [SCHEMA_VALIDATION_FAILED](#SCHEMA_VALIDATION_FAILED) | |
| [SECRET_PROPERTY](#SECRET_PROPERTY) | |
| [DISCRIMINATOR_VALUE_NOT_FOUND](#DISCRIMINATOR_VALUE_NOT_FOUND) | |
| [DISCRIMINATOR_NOT_REQUIRED](#DISCRIMINATOR_NOT_REQUIRED) | [OAV131](#DISCRIMINATOR_NOT_REQUIRED) |
| [RESPONSE_BODY_NOT_IN_EXAMPLE](#RESPONSE_BODY_NOT_IN_EXAMPLE) | [OAV130](#RESPONSE_BODY_NOT_IN_EXAMPLE) |
Expand Down Expand Up @@ -359,14 +359,6 @@ This document lists the set of automated rules that can be validated against swa

**How to fix the violation**: The error info has the position of swagger, look for the position in swagger and fix the value type of keyword.

### <a name="KEYWORD_TYPE_EXPECTED" />KEYWORD_TYPE_EXPECTED

**Output Message**: Keyword '{0}' is expected to be of type '{1}'.

**Description**: The value of the keyword in swagger should be the specific type.

**How to fix the violation**: Fix the value type of keyword.

### <a name="PATTERN" />PATTERN

**Output Message**: String does not match pattern {0}: {1}.
Expand Down Expand Up @@ -547,9 +539,9 @@ This document lists the set of automated rules that can be validated against swa

**Output Message**: This operation does not have a defined {0} response code.

**Description**: There's extra response code defined in example file.
**Description**: The specified response code is not defined in example file.

**How to fix the violation**: Remove extra response code definition in example or correct it.
**How to fix the violation**: Add response code to default, or add response code definition in the swagger.

### <a name="INVALID_RESPONSE_BODY" />INVALID_RESPONSE_BODY

Expand All @@ -559,15 +551,6 @@ This document lists the set of automated rules that can be validated against swa

**How to fix the violation**: Add response body.


### <a name="KEYWORD_TYPE_EXPECTED" />KEYWORD_TYPE_EXPECTED

**Output Message**: Keyword 'type' is expected to be of type 'array,boolean,integer,number,null,object,string'.

**Description**: According to Json schema spec, the allowed value for [type](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) is 'array,boolean,integer,number,null,object,string'.

**How to fix the violation**: Set the value of type to one of the values above.

### <a name="OBJECT_ADDITIONAL_PROPERTIES" />OBJECT_ADDITIONAL_PROPERTIES

**Output Message**: Additional properties not allowed:{0}.
Expand Down Expand Up @@ -801,6 +784,14 @@ This document lists the set of automated rules that can be validated against swa

**How to fix the violation**: Remove this definition if it's not used.

### <a name="SECRET_PROPERTY" />SECRET_PROPERTY

**Output Message**: Secret property {0} cannot be sent in the response.

**Description**: The secret is not allowed to return in response when it's annotated with x-ms-secret:true.

**How to fix the violation**: Remove this secret value from the response.


### <a name="ROUNDTRIP_INCONSISTENT_PROPERTY" />ROUNDTRIP_INCONSISTENT_PROPERTY

Expand All @@ -826,4 +817,4 @@ This document lists the set of automated rules that can be validated against swa

**Description**: The property was not in the PUT request, but it is returned in the subsequent GET response. This implies that the property is read-only or has a default value.

**How to fix the violation**: If the property is a read-only, update the swagger definition for this property to mark it as "readOnly": true. Alternatively, keep the property in the GET schema but remove it from the PUT schema. If the property has a default value, update the Swagger definition for this property to mark it with "default": <default value> annotation.
**How to fix the violation**: If the property is a read-only, update the swagger definition for this property to mark it as "readOnly": true. Alternatively, keep the property in the GET schema but remove it from the PUT schema. If the property has a default value, update the Swagger definition for this property to mark it with "default": <default value> annotation.
14 changes: 11 additions & 3 deletions documentation/code-gen/configure-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ See configuration in [readme.az.md](./readme.az.md)

## Az Configuration
Az dedicated configurations are configured in readme.az.md.
the typical package-name is usually like `@azure/arm-xxx` where the xxx is related with the service name.
and the typical output-folder in the azure-sdk-for-js is like `$(typescript-sdks-folder)/sdk/xxx/arm-xxx` where the xxx is related with the service name.
A typical readme.az.md is like this:
~~~
// file: readme.az.md
Expand All @@ -98,6 +96,16 @@ python-sdk-output-folder: "$(az-output-folder)/azext_communication/vendored_sdks
```
~~~
where:
1. the `extensions` means the name of the azure cli command modules,
1. the `namespace` means the python SDK namespace,
1. the `package-name` is the python SDK package name,
1. the `azure-cli-extension-folder` is the parameter that will be passed by user in their commmand line which should points to their local `azure-cli-extensions` repo.
*Note: this parameter `azure-cli-extension-folder` is only for Azure CLI extensions and if user are targeting generate the Azure CLI main repo modules, the parameter should be `azure-cli-folder` that points to their local `azure-cli` repo.*
1. the `az-output-folder` is the specific output folder of this command modules. we should follow the basic code structure either in Azure CLI extensions or in Azure CLI main modules. If it is Azure CLI extensions that we are targeting, then the folder path should be like `$(azure-cli-extension-folder)/src/{serviceFolderName}`. If it's the Azure CLI main modules that we are targeting, then the folder path should be like `$(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/{serviceFolderName}`.
1. the `python-sdk-output-folder` is the vendored sdk path. Please Note that, even if we don't really generate the sdk, but we still need the folder path. It's worth notable that in the parts before and after vendored sdks are also configurable for specific user scenarios.

*Note: it's better to add the yaml condition `$(target-mode) != 'core'` for generating cli extensions and `$(target-mode) == 'core'` for generating cli main modules. Make sure those configuration can only be accessed when wanted.*

## Multi-api
Currently the Azure CLI code generator doesn't support multi-api which means each operation contained in one package should only contains one api-version's.
Expand Down Expand Up @@ -237,4 +245,4 @@ autorest --az --use=@autorest/az@latest /home/qiaozha/code/azure-rest-api-specs/

## Advance Usage

For advance usage of CLI Codegen, Please refer to [autorest.az doc](https://github.com/Azure/autorest.az/tree/master/doc)
For advance usage of CLI Codegen, Please refer to [autorest.az doc](https://github.com/Azure/autorest.az/tree/master/doc)
Loading

0 comments on commit a5c1e62

Please sign in to comment.