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

Add Swagger and Examples for custom resource provider to Azure #5808

Merged
merged 2 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"parameters": {
"resourceProviderName": "newrp",
"resourceGroupName": "testRG",
"api-version": "2018-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceProvider": {
"location": "eastus",
"properties": {
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
},
"responses": {
"201": {
"body": {
"name": "newrp",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Accepted",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
},
"200": {
"body": {
"name": "newrp",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Accepted",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testRG",
"resourceProviderName": "newrp",
"api-version": "2018-09-01-preview"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testRG",
"resourceProviderName": "newrp",
"api-version": "2018-09-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"name": "newrp",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testRG",
"api-version": "2018-09-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"name": "newrp1",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp1",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
},
{
"name": "newrp2",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp2",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2018-09-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"name": "newrp1",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp1",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
},
{
"name": "newrp2",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG2/providers/Microsoft.CustomProviders/resourceProviders/newrp2",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2018-09-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.CustomProviders/resourceProviders/read",
"display": {
"provider": "Azure Custom Providers",
"resource": "resourceProviders",
"operation": "List Custom Providers",
"description": "List or get the Custom Providers"
}
},
{
"name": "Microsoft.CustomProviders/resourceProviders/delete",
"display": {
"provider": "Azure Custom Providers",
"resource": "resourceProviders",
"operation": "List Custom Providers",
"description": "List or get the Custom Providers"
}
},
{
"name": "Microsoft.CustomProviders/resourceProviders/wrte",
"display": {
"provider": "Azure Custom Providers",
"resource": "resourceProviders",
"operation": "List Custom Providers",
"description": "List or get the Custom Providers"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"resourceProviderName": "newrp",
"resourceGroupName": "testRG",
"api-version": "2018-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"patchableResource": {
"tags": {}
}
},
"responses": {
"200": {
"body": {
"name": "newrp",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp",
"type": "Microsoft.CustomProviders/resourceProviders",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"actions": [
{
"name": "TestAction",
"routingType": "Proxy",
"endpoint": "https://mytestendpoint/"
}
],
"resourceTypes": [
{
"name": "TestResource",
"routingType": "Proxy,Cache",
"endpoint": "https://mytestendpoint2/"
}
]
}
}
}
}
}
15 changes: 15 additions & 0 deletions specification/customproviders/resource-manager/readme.csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## C

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

```yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 1
clear-output-folder: true
client-side-validation: false
namespace: Microsoft.CustomProviders
output-folder: $(csharp-sdks-folder)/customproviders/management/Microsoft.CustomProviders/GeneratedProtocol
```
19 changes: 19 additions & 0 deletions specification/customproviders/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Go

These settings apply only when `--go` is specified on the command line.

```yaml $(go)
go:
license-header: MICROSOFT_APACHE_NO_VERSION
namespace: customproviders
clear-output-folder: true
```

### Tag: package-2018-09-01-preview and go

These settings apply only when `--tag=package-2018-09-01-preview --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

```yaml $(tag) == 'package-2018-09-01-preview' && $(go)
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2018-09-01-preview/$(namespace)
```
Loading