Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
442b03c
Add missing nullable attributes (#10245)
bleroy Jul 24, 2020
c13a24a
Adding AML Workspace ID Property (#10073)
mvvsubbu Jul 25, 2020
dff936d
Add a new api and add 2020-02-02-preview versions (#9710)
amolagar5 Jul 25, 2020
657448a
Add enableAutomaticUpgrade property to VMExtensions for VMs and VMSS …
chjaress Jul 25, 2020
c43fbcc
Add Location property to ExportPipeline and ImportPipeline (#10177)
jaysterp Jul 26, 2020
fd3d447
Dev monitor microsoft.insights 2020 05 01 preview (#10101)
moshemal Jul 27, 2020
3903ebe
Managed Clusters Generate SDK (#10247)
a-santamaria Jul 27, 2020
85ac404
Changed the Client description to include Gen2 (#10178)
Sandip-Raiyani Jul 27, 2020
94ce889
Update dataController onPremise property (#10263)
jorgbaca Jul 28, 2020
ee06806
[Hub Generated] Review request for Microsoft.Insights to add version …
yves-chan Jul 28, 2020
e8679c7
[Datashare]Add sorting query parameters (#10209)
vnvaditya Jul 28, 2020
c31ecb3
Migrate TaskRun to ProxyResource. (#9953)
huanwu Jul 28, 2020
3454359
[Datafactory]Add cloudType and snapshot to ADF public swagger (#10235)
rickysun93 Jul 28, 2020
cc6727f
Fix sfrp 2020-01-01-preview (#10268)
a-santamaria Jul 28, 2020
36b7276
add doc for typescript md (#10187)
qiaozha Jul 28, 2020
9a54501
add column delimiter for SAP Table/open hub (#10269)
wenbof-zx Jul 28, 2020
9120c92
Databricks Swagger Changes for Double Encryption (#9941)
mvvsubbu Jul 28, 2020
758c7d4
Fix example request for expanding policyEvaluationDetails (#10203)
j5lim Jul 28, 2020
6037545
Fix data plane cosmosdb (#10277)
ArcturusZhang Jul 28, 2020
de527c7
Key Vault 7.1-preview to stable (GA) (#10239)
jlichwa Jul 28, 2020
69a5085
[Datafactory] Add Support for Cancel Trigger Run Api (#10256)
arsunda Jul 28, 2020
c18564b
small updates (#10254)
Jul 28, 2020
aa9c384
Add On Premise Sql Resource Details (#10041)
shimonar1171 Jul 29, 2020
baaa15f
Update Microsoft.Resources swagger to include new alias contract (#10…
eladperets Jul 30, 2020
15a2aa2
Adding new path-based rule for the Compute API (#10253)
madewithsmiles Jul 30, 2020
9d13acc
Dev storageimportexport microsoft.import export 2016 11 01 (#10124)
nivats Jul 30, 2020
4873ee8
Fix api 2020-01-01-preview dataDiskSizeGB parameter name (#10280)
a-santamaria Jul 30, 2020
4a8b5a4
Fix hybridnetwork namespace of go SDK (#10286)
ArcturusZhang Jul 30, 2020
b8630cc
[Azure Cognitive Search] Add missing x-nullable annotations, part 2 (…
bitsforthought Jul 30, 2020
31ba1f3
[CosmosDB] Migration support of existing containers/databases to auto…
ravgill Jul 30, 2020
9cd5ff7
Documentation updated (#10283)
VitaliyKurokhtin Jul 30, 2020
7ad26a4
Update readme.md all-api-versions tags (#10296)
leniatgh Jul 30, 2020
f7665e5
[datashare] sort api's and definitions (#10273)
vnvaditya Jul 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/sla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,18 @@
subject: "Action Required: Please respond to issue ${URL}"
to: ${ASSIGNEE}
cc: vscswagger@microsoft.com

- scheduleTask:
action: sendEmail
scope: pull_request
name: "send email given path change"
trigger:
- path
args:
message: '<p>You have just completed the first step towards onboarding your API change to the Compute Management library.</p><p>We (<a href="mailto:cplatsdkdev@microsoft.com">the CPlatSDK/PowerShell team</a>) manage the Compute library&#39;s API and SDK for the following clients: Swagger (REST api), .NET SDK, and Azure PowerShell.</p><p>You&#39;ve just opened a PR making changes in the Compute Management Library&#39;s path of the Azure REST Api Specs repository.</p><p>What&#39;s next?</p><ol type="1"><li value="1">Your api specs need to be reviewed and approved by us and the ARM team</li><li>Make sure you that can generate the .NET SDK from your API specs using the Autorest tool (<a href="https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/73168/SDK-(.NET)?anchor=how-to-generate-the-sdk%3F">NET SDK autogeneration</a>)</li><li>While your specs are getting reviewed, you should be working on the .NET SDK. (<a href="https://github.com/Azure/azure-sdk-for-net/">SDK repo</a>)</li><ol type="a"><li value="1">Once you generate the .NET SDK, you need to create the SDK tests and perform recordings and playbacks. (<a href="https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/73168/SDK-(.NET)?anchor=how-to-set-up-testing-and-record-tests%3F">NET SDK testing</a>)</li><li>With the newly generated SDK with tests, you can make a pull request to the SDK repository.<br /> Make sure to add a reference to your Swagger pull request in the comments.</li></ol><li>[If applicable] At this stage, you can get started on the Azure PowerShell part.<ol type="a"><li value="1">All you need to do is send a design doc of any change/new Azure PowerShell cmdlet related to your api by creating an issue with your design <a href="https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues">here</a>.<br>Then, send an email to <a href="mailto:azdevxpsdr@microsoft.com">azdevxpsdr@microsoft.com</a> with the issue number and cc our dl (<a href="mailto:cplatsdkdev@microsoft.com">cplatsdkdev@microsoft.com</a>) on the email, so we can leave comments on your design doc as well.</li><li>Once your PowerShell cmdlet design has been approved, send an email to&nbsp;<a href="mailto:cplatsdkdev@microsoft.com?subject=PowerShell%20Design%20Review%20Approved">our team</a><br /> We will implement and test the PowerShell cmdlet following the approved design. We will then make a pull request to the appropriate repository</li></ol><li>[If applicable] You can also get started on any Azure CLI module or extension for your API change. Find more information about next steps on that process <a href="https://github.com/Azure/azure-cli/blob/dev/doc/onboarding_guide.md">here</a>.</li></ol><hr><ul type="disc"><li>To view the full CPlat SDK PowerShell API onboarding wiki, please visit <a href="https://aka.ms/cplatsdk">aka.ms/cplatsdk</a></li></ul><p>This email was automatically sent. Please send an email to&nbsp;<a href="mailto:cplatsdkdev@microsoft.com">cplatsdkdev@microsoft.com</a>&nbsp;if you have any questions.</p>'
targetPaths:
- "specification/compute/resource-manager/Microsoft.Compute/**"
subject: "[Action Required] CPlat Swagger Pull Request opened: Next steps"
to: ${AUTHOR}
cc:
- cplatsdkdev@microsoft.com
235 changes: 235 additions & 0 deletions documentation/code-gen/configure-typescript-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# Readme Configuration Guide for Azure SDK for Javascript (Typescript)
This file describe how to configure readme files to make it available for Azure SDK for Javascript (Typescript) code generation.

## Common Configuration
Configure basic package information.

### Basic Information
Configure package title/description/tag.
~~~~
// file: readme.md

``` yaml
title: xxxxConfigurationClient
description: xxxx Configuration Client
openapi-type: arm
tag: package-xxxx-xx-xx
```
~~~~

### tag
Tags are used to define what swagger files are used in specific client SDK. In Single-API client, only one tag can be used to generate SDK client.
A tag can contains a bunch of swagger files which are used to generate the SDK.

The name of a tag should be in form of package-yyyy-mm-dd[-xxx], for example below tag names are available:
- package-2020-02-03
- package-2020-03-22-preview
- package-2020-05-03-only

while the below tag names are invalid names:
- 2020-03-04
- package-preview-2020-03-04

A tag can be configured like below:
~~~~
// file: readme.md


### Tag: package-2019-12-01

These settings apply only when `--tag=package-2019-12-01` is specified on the command line.

``` yaml $(tag) == 'package-2019-12-01'
input-file:
- Microsoft.Compute/stable/2019-12-01/compute.json
- Microsoft.Compute/stable/2019-12-01/runCommands.json
- Microsoft.Compute/stable/2019-12-01/gallery.json
```
~~~~


## Swagger to SDK
To make Azure SDK for Javascript (Typescript) can be generated from the tag, swagger-to-sdk need to be configured:

~~~
// file: readme.md

## Swagger to SDK

This section describes what SDK should be generated by the automatic system.
This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-js
- ...


## Typescript

See configuration in [readme.typescript.md](./readme.typescript.md)
~~~

## Typescript Configuration
Typescript dedicated configurations are configured in readme.typescript.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.typescript.md is like this:
~~~
// file: readme.typescript.md

## TypeScript

These settings apply only when `--typescript` is specified on the command line.
Please also specify `--typescript-sdks-folder=<path to root folder of your azure-sdk-for-js clone>`.

``` yaml $(typescript)
typescript:
azure-arm: true
package-name: "@azure/arm-apimanagement"
output-folder: "$(typescript-sdks-folder)/sdk/apimanagement/arm-apimanagement"
clear-output-folder: true
generate-metadata: true
```

~~~

## Multi-api
Currently the Azure SDK for Javascript (Typescript) doesn't support multi-api which means each operation contained in one package should only contains one api-version's. and Azure SDK for Javascript (Typescript) only supports single api package.

## Multi-packages
The batch is a tag list which are used in the one RP has multi-package scenarios. For example,
the Resources RP has several independent packages like features, lock, policy.
First of all, you need to have different yaml block for each package to define the default tag for that specific package.
~~~
// file: readme.md
## Configuration

### Basic Information

These are the global settings for the Resource API.

``` yaml
openapi-type: arm
```

``` yaml $(package-features)
tag: package-features-2015-12
```

``` yaml $(package-locks)
tag: package-locks-2016-09
```

``` yaml $(package-policy)
tag: package-policy-2019-09
```

``` yaml $(package-resources)
tag: package-resources-2020-06
```

~~~
Then for each default tag, you can define the input swagger like normal tag.
~~~

### Tag: package-features-2015-12

These settings apply only when `--tag=package-features-2015-12` is specified on the command line.

``` yaml $(tag) == 'package-features-2015-12'
input-file:
- Microsoft.Features/stable/2015-12-01/features.json
```

### Tag: package-locks-2016-09

These settings apply only when `--tag=package-locks-2016-09` is specified on the command line.

``` yaml $(tag) == 'package-locks-2016-09'
input-file:
- Microsoft.Authorization/stable/2016-09-01/locks.json
```

### Tag: package-policy-2019-09

These settings apply only when `--tag=package-policy-2019-09` is specified on the command line.

``` yaml $(tag) == 'package-policy-2019-09'
input-file:
- Microsoft.Authorization/stable/2019-09-01/policyAssignments.json
- Microsoft.Authorization/stable/2019-09-01/policyDefinitions.json
- Microsoft.Authorization/stable/2019-09-01/policySetDefinitions.json

# Needed when there is more than one input file
override-info:
title: PolicyClient
```

### Tag: package-resources-2020-06

These settings apply only when `--tag=package-resources-2020-06` is specified on the command line.

``` yaml $(tag) == 'package-resources-2020-06'
input-file:
- Microsoft.Resources/stable/2020-06-01/resources.json
```
~~~

Finally, in your readme.typescript.md you should include what packages you want to include in the Azure SDK for Javascript (Typescript).
And in each package's section define the default package name output folder in azure-sdk-for-js repo etc.

~~~
## TypeScript

These settings apply only when `--typescript` is specified on the command line.
Please also specify `--typescript-sdks-folder=<path to root folder of your azure-sdk-for-js clone>`.

```yaml $(typescript) && !$(profile)
typescript:
azure-arm: true
batch: true
generate-metadata: true
batch:
- package-features: true
- package-locks: true
- package-policy: true
- package-resources: true
```

```yaml $(typescript) && $(package-features) && !$(profile)
typescript:
package-name: "@azure/arm-features"
output-folder: "$(typescript-sdks-folder)/sdk/features/arm-features"
clear-output-folder: true
```

```yaml $(typescript) && $(package-locks) && !$(profile)
typescript:
package-name: "@azure/arm-locks"
output-folder: "$(typescript-sdks-folder)/sdk/locks/arm-locks"
clear-output-folder: true
```

```yaml $(typescript) && $(package-policy) && !$(profile)
typescript:
package-name: "@azure/arm-policy"
output-folder: "$(typescript-sdks-folder)/sdk/policy/arm-policy"
clear-output-folder: true
```

```yaml $(typescript) && $(package-resources) && !$(profile)
typescript:
package-name: "@azure/arm-resources"
output-folder: "$(typescript-sdks-folder)/sdk/resources/arm-resources"
clear-output-folder: true
```

~~~


## Run codegen
After configure all the readme files, autorest can be used to generate SDK.
~~~
autorest --typescript --typescript-sdks-folder=/home/qiaozha/code/azure-sdk-for-js --license-header=MICROSOFT_MIT_NO_VERSION /home/qiaozha/code/azure-rest-api-specs/specification/storage/resource-manager/readme.md --use=@microsoft.azure/autorest.typescript@4.2.2
~~~
10 changes: 9 additions & 1 deletion specification/advisor/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ openapi-type: arm
tag: package-2020-01
```

### Tag: package-2020-07-preview

These settings apply only when `--tag=package-2020-07-preview` is specified on the command line.

```yaml $(tag) == 'package-2020-07-preview'
input-file:
- Microsoft.Advisor/preview/2020-07-01-preview/advisor.json
```

### Tag: package-2020-01

Expand Down Expand Up @@ -149,11 +157,11 @@ require: $(this-folder)/../../../profiles/readme.md

# all the input files across all versions
input-file:
- $(this-folder)/Microsoft.Advisor/preview/2020-07-01-preview/advisor.json
- $(this-folder)/Microsoft.Advisor/stable/2020-01-01/advisor.json
- $(this-folder)/Microsoft.Advisor/stable/2017-04-19/advisor.json
- $(this-folder)/Microsoft.Advisor/stable/2017-03-31/advisor.json
- $(this-folder)/Microsoft.Advisor/preview/2016-07-12-preview/advisor.json
- $(this-folder)/Microsoft.Advisor/preview/2020-07-01-preview/advisor.json

```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,13 @@
"type": "boolean"
},
"approvalRequired": {
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.",
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.",
"type": "boolean"
},
"subscriptionsLimit": {
"type": "integer",
"format": "int32",
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true."
},
"state": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3330,13 +3330,13 @@
"type": "boolean"
},
"approvalRequired": {
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.",
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.",
"type": "boolean"
},
"subscriptionsLimit": {
"type": "integer",
"format": "int32",
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true."
},
"state": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3545,13 +3545,13 @@
"type": "boolean"
},
"approvalRequired": {
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.",
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.",
"type": "boolean"
},
"subscriptionsLimit": {
"type": "integer",
"format": "int32",
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true."
},
"state": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5344,12 +5344,12 @@
},
"approvalRequired": {
"type": "boolean",
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true."
},
"subscriptionsLimit": {
"type": "integer",
"format": "int32",
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true."
},
"state": {
"type": "string",
Expand Down Expand Up @@ -5624,12 +5624,12 @@
},
"approvalRequired": {
"type": "boolean",
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true."
},
"subscriptionsLimit": {
"type": "integer",
"format": "int32",
"description": "whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
"description": "whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true."
},
"state": {
"type": "string",
Expand Down
Loading