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

update attestation swagger #6655

Merged
merged 4 commits into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
}
},
"default": {
"description": "Attestation service error result",
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand All @@ -77,17 +77,16 @@
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "providerName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-z0-9]{3,24}$",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this is the real change. Since this is a preview version and this will not bring breaking change. I think it's ok.

Copy link
Contributor Author

@shleiAmy shleiAmy Jul 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@myronfanqiu The readme.md file is already generated and published in the repo under https://github.com/Azure/azure-rest-api-specs/tree/master/specification/attestation/resource-manager .
This pull request is only a update for the existing attestation.jaon file.

"description": "Name of the attestation service instance"
},
{
Expand All @@ -104,7 +103,7 @@
"default": {
"description": "Error result from Attestation service",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand All @@ -122,17 +121,16 @@
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "providerName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]{3,24}$",
"description": "Name of the attestation service"
},
{
Expand Down Expand Up @@ -164,7 +162,7 @@
"default": {
"description": "Error result from Attestation service",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand All @@ -182,37 +180,36 @@
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "providerName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]{3,24}$",
"description": "Name of the attestation service"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"202": {
"description": "Request accepted for deletion of attestation service"
},
"200": {
"description": "Resource exists and was deleted successfully"
},
"202": {
"description": "Request accepted for deletion of attestation service"
},
"204": {
"description": "Resource does not exist"
},
"default": {
"description": "Error result from Attestation service",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand All @@ -235,7 +232,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
}
],
"x-ms-pageable": {
Expand All @@ -251,7 +248,7 @@
"default": {
"description": "Attestation service error result",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand All @@ -271,13 +268,13 @@
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
}
],
"x-ms-pageable": {
Expand All @@ -294,7 +291,7 @@
"default": {
"description": "Attestation service error result",
"schema": {
"$ref": "#/definitions/ErrorResult"
"$ref": "#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -357,7 +354,7 @@
],
"allOf": [
{
"$ref": "../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
}
],
"properties": {
Expand Down Expand Up @@ -395,56 +392,28 @@
}
}
},
"ErrorResult": {
"type": "object",
"title": "Error",
"description": "Error description and code explaining why an operation failed.",
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"type": "object",
"description": "Error object.",
"$ref": "#/definitions/ErrorResponseBody"
"$ref": "#/definitions/CloudErrorBody"
}
}
},
"description": "An error response from Attestation."
},
"ErrorResponseBody": {
"type": "object",
"title": "Error",
"description": "Error description and code explaining why an operation failed.",
"required": [
"message",
"code"
],
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
"message": {
"code": {
"type": "string",
"description": "Description of the error."
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"code": {
"message": {
"type": "string",
"description": "Service specific error code"
"description": "A message describing the error, intended to be suitable for displaying in a user interface."
}
}
},
"ErrorResponse": {
"type": "object",
"description": "Error response",
"properties": {
"error": {
"type": "object",
"description": "Error response",
"properties": {
"code": {
"type": "string",
"description": "Description of the error."
},
"message": {
"type": "string",
"description": "Service specific error code."
}
}
}
}
},
"description": "An error response from Attestation."
},
"AttestationProviderListResult": {
"description": "Attestation Providers List.",
Expand All @@ -469,24 +438,6 @@
}
},
"parameters": {
"ResourceGroupNameParameter": {
"name": "resourceGroupName",
"in": "path",
"description": "Name of the resource group to which the resource belongs.",
"required": true,
"type": "string",
"maxLength": 90,
"minLength": 1,
"pattern": "^[-\\w\\._\\(\\)]+[^\\.]$",
"x-ms-parameter-location": "method"
},
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Subscription credentials that uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"serviceName": "sampleservicename",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2018-09-01-preview",
"providerName": "providerName1",
"providerName": "providername1",
"creationParams": "test"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"serviceName": "sampleservicename",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2018-09-01-preview",
"providerName": "providerName1"
"providerName": "providername1"
},
"responses": {
"202": {
Expand Down
10 changes: 5 additions & 5 deletions specification/attestation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ These are the global settings for the Attestation API.

``` yaml
openapi-type: arm
tag: package-2018-09
tag: package-2018-09-preview
```

### Tag: package-2018-09
### Tag: package-2018-09-preview

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

``` yaml $(tag) == 'package-2018-09'
``` yaml $(tag) == 'package-2018-09-preview'
input-file:
- Microsoft.Attestation/2018-09-01-preview/attestation.json
- Microsoft.Attestation/preview/2018-09-01-preview/attestation.json
```

---
Expand Down