Skip to content

Commit 6635aea

Browse files
authored
[AutoPR web/resource-manager] Adding new API version for Microsoft.Web RP which fixes swagger errors (#2340)
* Generated from 574e458be59a062c8af950ba83768ea41095a1d2 Fixing API version in the examples * Generated from 8957477812a8f2abbc895a363756062be9f2ca45 Removed location element for top level domain examples
1 parent 360d2e8 commit 6635aea

File tree

3 files changed

+8
-58
lines changed

3 files changed

+8
-58
lines changed

azure-mgmt-web/azure/mgmt/web/models/default_error_response_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class DefaultErrorResponseError(Model):
3232
"""
3333

3434
_validation = {
35-
'code': {'required': True, 'readonly': True},
36-
'message': {'required': True, 'readonly': True},
35+
'code': {'readonly': True},
36+
'message': {'readonly': True},
3737
'target': {'readonly': True},
3838
'innererror': {'readonly': True},
3939
}

azure-mgmt-web/azure/mgmt/web/models/default_error_response_error_details_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class DefaultErrorResponseErrorDetailsItem(Model):
2727
"""
2828

2929
_validation = {
30-
'code': {'required': True, 'readonly': True},
31-
'message': {'required': True, 'readonly': True},
30+
'code': {'readonly': True},
31+
'message': {'readonly': True},
3232
'target': {'readonly': True},
3333
}
3434

azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def get(
248248

249249

250250
def _create_or_update_initial(
251-
self, resource_group_name, name, site_envelope, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config):
251+
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
252252
# Construct URL
253253
url = self.create_or_update.metadata['url']
254254
path_format_arguments = {
@@ -260,14 +260,6 @@ def _create_or_update_initial(
260260

261261
# Construct parameters
262262
query_parameters = {}
263-
if skip_dns_registration is not None:
264-
query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool')
265-
if skip_custom_domain_verification is not None:
266-
query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool')
267-
if force_dns_registration is not None:
268-
query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool')
269-
if ttl_in_seconds is not None:
270-
query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str')
271263
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
272264

273265
# Construct headers
@@ -307,7 +299,7 @@ def _create_or_update_initial(
307299
return deserialized
308300

309301
def create_or_update(
310-
self, resource_group_name, name, site_envelope, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config):
302+
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
311303
"""Creates a new web, mobile, or API app in an existing resource group, or
312304
updates an existing app.
313305

@@ -323,19 +315,6 @@ def create_or_update(
323315
:param site_envelope: A JSON representation of the app properties. See
324316
example.
325317
:type site_envelope: ~azure.mgmt.web.models.Site
326-
:param skip_dns_registration: If true web app hostname is not
327-
registered with DNS on creation. This parameter is
328-
only used for app creation.
329-
:type skip_dns_registration: bool
330-
:param skip_custom_domain_verification: If true, custom (non
331-
*.azurewebsites.net) domains associated with web app are not verified.
332-
:type skip_custom_domain_verification: bool
333-
:param force_dns_registration: If true, web app hostname is force
334-
registered with DNS.
335-
:type force_dns_registration: bool
336-
:param ttl_in_seconds: Time to live in seconds for web app's default
337-
domain name.
338-
:type ttl_in_seconds: str
339318
:param dict custom_headers: headers that will be added to the request
340319
:param bool raw: returns the direct response alongside the
341320
deserialized response
@@ -350,10 +329,6 @@ def create_or_update(
350329
resource_group_name=resource_group_name,
351330
name=name,
352331
site_envelope=site_envelope,
353-
skip_dns_registration=skip_dns_registration,
354-
skip_custom_domain_verification=skip_custom_domain_verification,
355-
force_dns_registration=force_dns_registration,
356-
ttl_in_seconds=ttl_in_seconds,
357332
custom_headers=custom_headers,
358333
raw=True,
359334
**operation_config
@@ -399,7 +374,7 @@ def get_long_running_output(response):
399374
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'}
400375

401376
def delete(
402-
self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, skip_dns_registration=None, custom_headers=None, raw=False, **operation_config):
377+
self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config):
403378
"""Deletes a web, mobile, or API app, or one of the deployment slots.
404379

405380
Deletes a web, mobile, or API app, or one of the deployment slots.
@@ -415,8 +390,6 @@ def delete(
415390
will be empty after app deletion and you want to delete the empty App
416391
Service plan. By default, the empty App Service plan is not deleted.
417392
:type delete_empty_server_farm: bool
418-
:param skip_dns_registration: If true, DNS registration is skipped.
419-
:type skip_dns_registration: bool
420393
:param dict custom_headers: headers that will be added to the request
421394
:param bool raw: returns the direct response alongside the
422395
deserialized response
@@ -441,8 +414,6 @@ def delete(
441414
query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool')
442415
if delete_empty_server_farm is not None:
443416
query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool')
444-
if skip_dns_registration is not None:
445-
query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool')
446417
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
447418

448419
# Construct headers
@@ -470,7 +441,7 @@ def delete(
470441
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'}
471442

472443
def update(
473-
self, resource_group_name, name, site_envelope, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config):
444+
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
474445
"""Creates a new web, mobile, or API app in an existing resource group, or
475446
updates an existing app.
476447

@@ -486,19 +457,6 @@ def update(
486457
:param site_envelope: A JSON representation of the app properties. See
487458
example.
488459
:type site_envelope: ~azure.mgmt.web.models.SitePatchResource
489-
:param skip_dns_registration: If true web app hostname is not
490-
registered with DNS on creation. This parameter is
491-
only used for app creation.
492-
:type skip_dns_registration: bool
493-
:param skip_custom_domain_verification: If true, custom (non
494-
*.azurewebsites.net) domains associated with web app are not verified.
495-
:type skip_custom_domain_verification: bool
496-
:param force_dns_registration: If true, web app hostname is force
497-
registered with DNS.
498-
:type force_dns_registration: bool
499-
:param ttl_in_seconds: Time to live in seconds for web app's default
500-
domain name.
501-
:type ttl_in_seconds: str
502460
:param dict custom_headers: headers that will be added to the request
503461
:param bool raw: returns the direct response alongside the
504462
deserialized response
@@ -520,14 +478,6 @@ def update(
520478

521479
# Construct parameters
522480
query_parameters = {}
523-
if skip_dns_registration is not None:
524-
query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool')
525-
if skip_custom_domain_verification is not None:
526-
query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool')
527-
if force_dns_registration is not None:
528-
query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool')
529-
if ttl_in_seconds is not None:
530-
query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str')
531481
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
532482

533483
# Construct headers

0 commit comments

Comments
 (0)