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

Check Resource Name added to swagger #9185

Merged
merged 17 commits into from
Jul 11, 2020
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"body": [
{
"Name": "isxbox",
"Type": "ResourceProviderTestHost/TestResourceType"
}
],
"api-version": "2020-01-01"
},
"responses": {
"200": {
"body": {
"name": "isxbox",
"type": "ResourceProviderTestHost/TestResourceType",
"status": "Allowed"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,55 @@
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.Resources/checkResourceName": {
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
"post": {
"tags": [
"Tenants"
],
"operationId": "checkResourceName",
"description": "Checks if the resource name is valid or not",
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
"summary": "Checks resource name validity",
"consumes": [
"application/json"
],
"parameters": [
{
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
"in": "body",
"name": "",
"schema": {
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string"
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
},
"type": {
"type": "string"
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns status as allowed or not.",
"schema": {
"$ref": "#/definitions/CheckResourceNameResult"
}
}
},
"x-ms-examples": {
"Check validity for a resource name.": {
"$ref": "./examples/CheckResourceName.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -518,6 +567,23 @@
],
"description": "Tenant Ids information."
},
"CheckResourceNameResult": {
"properties": {
"name": {
"description": "Name of Resource",
"type": "string"
},
"type": {
"description": "Type of Resource",
"type": "string"
},
"status": {
"description": "Is the resource name allowed or not",
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
"type": "string"
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
}
},
"description": "Validity of Resource name for the given type"
shreyanshn marked this conversation as resolved.
Show resolved Hide resolved
},
"Operation": {
"description": "Microsoft.Resources operation",
"type": "object",
Expand Down