Skip to content

Commit

Permalink
CodeGen from PR 13492 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Remove name check from client side (Azure#13492)

* remove name validation from client side

* remove name check from deploymentScripts swagger

* remove name check from previous swagger versions

* remove pattern from resourcegroupname parameter
  • Loading branch information
SDKAuto committed Apr 14, 2021
1 parent 1051a43 commit dffec9f
Show file tree
Hide file tree
Showing 15 changed files with 162 additions and 161 deletions.
1 change: 1 addition & 0 deletions sdk/resources/azure-mgmt-resource/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "5ebfcd4b49d937aa5a151952122e713d12bb94f9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
"readme": "specification/resources/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _create_initial(
url = self.create.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -174,7 +174,7 @@ def update(
url = self.update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -243,7 +243,7 @@ def get(
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -304,7 +304,7 @@ def delete(
url = self.delete.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -424,7 +424,7 @@ def get_logs(
url = self.get_logs.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -491,7 +491,7 @@ def get_logs_default(
url = self.get_logs_default.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -554,7 +554,7 @@ def prepare_request(next_link=None):
url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,6 @@ class GenericResource(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'pattern': r'^[-\w\._,\(\)]+$'},
}

_attribute_map = {
Expand Down Expand Up @@ -1121,7 +1120,6 @@ class GenericResourceExpanded(GenericResource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'pattern': r'^[-\w\._,\(\)]+$'},
'created_time': {'readonly': True},
'changed_time': {'readonly': True},
'provisioning_state': {'readonly': True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,6 @@ class GenericResource(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'pattern': r'^[-\w\._,\(\)]+$'},
}

_attribute_map = {
Expand Down Expand Up @@ -1121,7 +1120,6 @@ class GenericResourceExpanded(GenericResource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'pattern': r'^[-\w\._,\(\)]+$'},
'created_time': {'readonly': True},
'changed_time': {'readonly': True},
'provisioning_state': {'readonly': True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_at_scope(
url = self.get_at_scope.metadata['url']
path_format_arguments = {
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'operationId': self._serialize.url("operation_id", operation_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -129,7 +129,7 @@ def prepare_request(next_link=None):
url = self.list_at_scope.metadata['url']
path_format_arguments = {
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$')
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down Expand Up @@ -200,7 +200,7 @@ def get_at_tenant_scope(
# Construct URL
url = self.get_at_tenant_scope.metadata['url']
path_format_arguments = {
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'operationId': self._serialize.url("operation_id", operation_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -262,7 +262,7 @@ def prepare_request(next_link=None):
# Construct URL
url = self.list_at_tenant_scope.metadata['url']
path_format_arguments = {
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$')
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down Expand Up @@ -336,7 +336,7 @@ def get_at_management_group_scope(
url = self.get_at_management_group_scope.metadata['url']
path_format_arguments = {
'groupId': self._serialize.url("group_id", group_id, 'str', max_length=90, min_length=1),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'operationId': self._serialize.url("operation_id", operation_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -401,7 +401,7 @@ def prepare_request(next_link=None):
url = self.list_at_management_group_scope.metadata['url']
path_format_arguments = {
'groupId': self._serialize.url("group_id", group_id, 'str', max_length=90, min_length=1),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$')
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down Expand Up @@ -472,7 +472,7 @@ def get_at_subscription_scope(
# Construct URL
url = self.get_at_subscription_scope.metadata['url']
path_format_arguments = {
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'operationId': self._serialize.url("operation_id", operation_id, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -535,7 +535,7 @@ def prepare_request(next_link=None):
# Construct URL
url = self.list_at_subscription_scope.metadata['url']
path_format_arguments = {
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -610,8 +610,8 @@ def get(
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'operationId': self._serialize.url("operation_id", operation_id, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -677,8 +677,8 @@ def prepare_request(next_link=None):
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
Loading

0 comments on commit dffec9f

Please sign in to comment.