Skip to content

Commit

Permalink
add constraint for servername (#23623)
Browse files Browse the repository at this point in the history
* add constraint for servername

* fix model validation

* update 2022-01-01 for servernameparameter

* unify servernameparameter for 2021-12-01-preview
  • Loading branch information
xiaoxuqi-ms authored Apr 24, 2023
1 parent fd0b301 commit fda03ac
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -119,7 +119,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -169,7 +169,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -214,7 +214,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -322,14 +322,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method"
},
"AdministratorNameParameter": {
"name": "administratorName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -124,7 +124,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -179,7 +179,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdministratorNameParameter"
Expand Down Expand Up @@ -224,7 +224,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -332,15 +332,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method",
"pattern": "^[a-z0-9][-a-z0-9]*(?<!-)$"
},
"AdministratorNameParameter": {
"name": "administratorName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/BackupNameParameter"
Expand Down Expand Up @@ -100,7 +100,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/BackupNameParameter"
Expand Down Expand Up @@ -145,7 +145,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -239,14 +239,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method"
},
"BackupNameParameter": {
"name": "backupName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/BackupNameParameter"
Expand Down Expand Up @@ -100,7 +100,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/BackupNameParameter"
Expand Down Expand Up @@ -145,7 +145,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -239,15 +239,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method",
"pattern": "^[a-z0-9][-a-z0-9]*(?<!-)$"
},
"BackupNameParameter": {
"name": "backupName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -118,7 +118,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -174,7 +174,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -219,7 +219,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"name": "parameters",
Expand Down Expand Up @@ -277,7 +277,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationTagsParameter"
Expand Down Expand Up @@ -505,14 +505,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method"
},
"ConfigurationNameParameter": {
"name": "configurationName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -118,7 +118,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -179,7 +179,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationNameParameter"
Expand Down Expand Up @@ -224,7 +224,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"name": "parameters",
Expand Down Expand Up @@ -287,7 +287,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/ConfigurationTagsParameter"
Expand Down Expand Up @@ -515,15 +515,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method",
"pattern": "^[a-z0-9][-a-z0-9]*(?<!-)$"
},
"ConfigurationNameParameter": {
"name": "configurationName",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
Expand Down Expand Up @@ -119,7 +119,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
Expand Down Expand Up @@ -166,7 +166,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
Expand Down Expand Up @@ -211,7 +211,7 @@
"$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
"$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -300,14 +300,6 @@
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method"
},
"DatabaseNameParameter": {
"name": "databaseName",
"in": "path",
Expand Down
Loading

0 comments on commit fda03ac

Please sign in to comment.