Skip to content

Commit

Permalink
Fix Swagger Correctness Issues (#15185)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajshah11 authored Jul 22, 2021
1 parent 7a4a643 commit c671429
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"200": {
"description": "List all the operations.",
"schema": {
"$ref": "#/definitions/OperationList"
"$ref": "#/definitions/OperationListValue"
}
},
"default": {
Expand Down Expand Up @@ -327,6 +327,15 @@
}
}
},
"OperationListValue": {
"type": "object",
"description": "List of supported operations.",
"properties": {
"value": {
"$ref": "#/definitions/OperationList"
}
}
},
"OperationList": {
"type": "array",
"description": "List of supported operations.",
Expand Down Expand Up @@ -384,10 +393,8 @@
"description": "Description of the error."
},
"code": {
"type": "integer",
"description": "Service specific error code which serves as the substatus for the HTTP error code.",
"minimum": 100,
"maximum": 600
"type": "string",
"description": "Service specific error code which serves as the substatus for the HTTP error code."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,55 @@
},
"responses": {
"200": {
"body": [
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/read",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Get Canonical support plan state",
"description": "Get the specified Canonical support plan state."
"body": {
"value": [
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/read",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Get Canonical support plan state",
"description": "Get the specified Canonical support plan state."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/write",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Adds a Canonical support plan.",
"description": "Adds the Canonical support plan type specified."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/delete",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Removes the Canonical support plan",
"description": "Removes the specified Canonical support plan"
}
},
{
"name": "Microsoft.Addons/supportProviders/canonical/supportPlanTypes/get",
"display": {
"provider": "Microsoft Addons",
"resource": "supportProviders",
"operation": "Gets available Canonical support plan types.",
"description": "Gets the available Canonical support plan types as well as some extra metadata on their enabled status."
}
},
{
"name": "Microsoft.Addons/register/action",
"display": {
"provider": "Microsoft Addons",
"resource": "register",
"operation": "Register for Microsoft.Addons",
"description": "Register the specified subscription with Microsoft.Addons"
}
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/write",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Adds a Canonical support plan.",
"description": "Adds the Canonical support plan type specified."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/delete",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Removes the Canonical support plan",
"description": "Removes the specified Canonical support plan"
}
},
{
"name": "Microsoft.Addons/supportProviders/canonical/supportPlanTypes/get",
"display": {
"provider": "Microsoft Addons",
"resource": "supportProviders",
"operation": "Gets available Canonical support plan types.",
"description": "Gets the available Canonical support plan types as well as some extra metadata on their enabled status."
}
},
{
"name": "Microsoft.Addons/register/action",
"display": {
"provider": "Microsoft Addons",
"resource": "register",
"operation": "Register for Microsoft.Addons",
"description": "Register the specified subscription with Microsoft.Addons"
}
}
]
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"200": {
"description": "List all the operations.",
"schema": {
"$ref": "#/definitions/OperationList"
"$ref": "#/definitions/OperationListValue"
}
},
"default": {
Expand Down Expand Up @@ -336,6 +336,15 @@
}
}
},
"OperationListValue": {
"type": "object",
"description": "List of supported operations.",
"properties": {
"value": {
"$ref": "#/definitions/OperationList"
}
}
},
"OperationList": {
"type": "array",
"description": "List of supported operations.",
Expand Down Expand Up @@ -393,10 +402,8 @@
"description": "Description of the error."
},
"code": {
"type": "integer",
"description": "Service specific error code which serves as the substatus for the HTTP error code.",
"minimum": 100,
"maximum": 600
"type": "string",
"description": "Service specific error code which serves as the substatus for the HTTP error code."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
{
"parameters": {
"api-version": "2017-05-15"
"api-version": "2018-03-01"
},
"responses": {
"200": {
"body": [
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/read",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Get Canonical support plan state",
"description": "Get the specified Canonical support plan state."
"body": {
"value": [
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/read",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Get Canonical support plan state",
"description": "Get the specified Canonical support plan state."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/write",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Adds a Canonical support plan.",
"description": "Adds the Canonical support plan type specified."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/delete",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Removes the Canonical support plan",
"description": "Removes the specified Canonical support plan"
}
},
{
"name": "Microsoft.Addons/supportProviders/canonical/supportPlanTypes/get",
"display": {
"provider": "Microsoft Addons",
"resource": "supportProviders",
"operation": "Gets available Canonical support plan types.",
"description": "Gets the available Canonical support plan types as well as some extra metadata on their enabled status."
}
},
{
"name": "Microsoft.Addons/register/action",
"display": {
"provider": "Microsoft Addons",
"resource": "register",
"operation": "Register for Microsoft.Addons",
"description": "Register the specified subscription with Microsoft.Addons"
}
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/write",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Adds a Canonical support plan.",
"description": "Adds the Canonical support plan type specified."
}
},
{
"name": "Microsoft.Addons/supportProviders/supportPlanTypes/delete",
"display": {
"provider": "Microsoft Addons",
"resource": "supportPlanTypes",
"operation": "Removes the Canonical support plan",
"description": "Removes the specified Canonical support plan"
}
},
{
"name": "Microsoft.Addons/supportProviders/canonical/supportPlanTypes/get",
"display": {
"provider": "Microsoft Addons",
"resource": "supportProviders",
"operation": "Gets available Canonical support plan types.",
"description": "Gets the available Canonical support plan types as well as some extra metadata on their enabled status."
}
},
{
"name": "Microsoft.Addons/register/action",
"display": {
"provider": "Microsoft Addons",
"resource": "register",
"operation": "Register for Microsoft.Addons",
"description": "Register the specified subscription with Microsoft.Addons"
}
}
]
]
}
}
}
}

0 comments on commit c671429

Please sign in to comment.