Skip to content

Commit

Permalink
Updating WindowsIot Swagger Issues (S360 Swagger Linting) (#12094)
Browse files Browse the repository at this point in the history
* Updating ErrorDetails to match DefaultErrorResponseSchema (R4007)

* Updated Schema for Delete to include 204 response (R4011 DeleteOperationResponses)

* OperationsApiResponseSchema (R4018): Adding isDataAction attribute

* Create/Update examples

* Fix Swagger Issue 8945 (jagamu)

* Model Validation Success

* prettier check, passing

Co-authored-by: Adithya Jayachandran <adjayach@microsoft.com>
  • Loading branch information
adithyaj and Adithya Jayachandran authored Jan 12, 2021
1 parent 0467bd6 commit fc3091f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"description": "The Windows IoT Device Service metadata and security metadata.",
"required": true,
"schema": {
"$ref": "#/definitions/DeviceServiceProperties"
"$ref": "#/definitions/DeviceService"
}
},
{
Expand Down Expand Up @@ -196,7 +196,7 @@
"description": "The Windows IoT Device Service metadata and security metadata.",
"required": true,
"schema": {
"$ref": "#/definitions/DeviceServiceProperties"
"$ref": "#/definitions/DeviceService"
}
},
{
Expand Down Expand Up @@ -255,6 +255,12 @@
"$ref": "#/definitions/DeviceService"
}
},
"204": {
"description": "OK. The request has succeeded with no content to return.",
"schema": {
"$ref": "#/definitions/DeviceService"
}
},
"default": {
"description": "DefaultErrorResponse",
"schema": {
Expand Down Expand Up @@ -538,6 +544,10 @@
"display": {
"$ref": "#/definitions/OperationDisplayInfo",
"description": "The operation supported by Azure Data Catalog Service."
},
"isDataAction": {
"description": "Indicates whether the operation is a data action",
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -566,21 +576,27 @@
"ErrorDetails": {
"description": "The details of the error.",
"properties": {
"code": {
"description": "One of a server-defined set of error codes.",
"type": "string"
},
"message": {
"description": "A human-readable representation of the error.",
"type": "string"
},
"target": {
"description": "The target of the particular error.",
"type": "string"
},
"details": {
"description": "A human-readable representation of the error's details.",
"type": "string"
"error": {
"type": "object",
"description": "The error object.",
"properties": {
"code": {
"description": "One of a server-defined set of error codes.",
"type": "string"
},
"message": {
"description": "A human-readable representation of the error.",
"type": "string"
},
"target": {
"description": "The target of the particular error.",
"type": "string"
},
"details": {
"description": "A human-readable representation of the error's details.",
"type": "string"
}
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
"deviceName": "service4445",
"api-version": "2019-06-01",
"deviceService": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
"notes": "blah",
"quantity": 1000000
"location": "East US",
"properties": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
"notes": "blah",
"quantity": 1000000
}
}
},
"responses": {
"200": {
"body": {
"location": "East US",
"properties": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
},
"type": "Microsoft.WindowsIoT/Services"
}
},
"204": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@
"deviceName": "service8596",
"api-version": "2019-06-01",
"deviceService": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
"notes": "blah",
"quantity": 1000000
"location": "East US",
"properties": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
"notes": "blah",
"quantity": 1000000
}
},
"monitor": "true"
},
"responses": {
"200": {
"body": {
"location": "East US",
"properties": {
"billingDomainName": "a.b.c",
"adminDomainName": "d.e.f",
"notes": "blah",
"startDate": "2018-01-01T12:00:00000Z",
"quantity": 1000000
},
"location": "westus",
"type": "Microsoft.WindowsIoT/Services"
}
}
Expand Down

0 comments on commit fc3091f

Please sign in to comment.