Skip to content

Commit

Permalink
[AutoPR web/resource-manager] Adding new API version for Microsoft.We…
Browse files Browse the repository at this point in the history
…b 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
  • Loading branch information
AutorestCI authored Apr 12, 2018
1 parent 360d2e8 commit 6635aea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class DefaultErrorResponseError(Model):
"""

_validation = {
'code': {'required': True, 'readonly': True},
'message': {'required': True, 'readonly': True},
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'innererror': {'readonly': True},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class DefaultErrorResponseErrorDetailsItem(Model):
"""

_validation = {
'code': {'required': True, 'readonly': True},
'message': {'required': True, 'readonly': True},
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
}

Expand Down
58 changes: 4 additions & 54 deletions azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def get(


def _create_or_update_initial(
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):
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
Expand All @@ -260,14 +260,6 @@ def _create_or_update_initial(

# Construct parameters
query_parameters = {}
if skip_dns_registration is not None:
query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool')
if skip_custom_domain_verification is not None:
query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool')
if force_dns_registration is not None:
query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool')
if ttl_in_seconds is not None:
query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand Down Expand Up @@ -307,7 +299,7 @@ def _create_or_update_initial(
return deserialized

def create_or_update(
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):
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
"""Creates a new web, mobile, or API app in an existing resource group, or
updates an existing app.

Expand All @@ -323,19 +315,6 @@ def create_or_update(
:param site_envelope: A JSON representation of the app properties. See
example.
:type site_envelope: ~azure.mgmt.web.models.Site
:param skip_dns_registration: If true web app hostname is not
registered with DNS on creation. This parameter is
only used for app creation.
:type skip_dns_registration: bool
:param skip_custom_domain_verification: If true, custom (non
*.azurewebsites.net) domains associated with web app are not verified.
:type skip_custom_domain_verification: bool
:param force_dns_registration: If true, web app hostname is force
registered with DNS.
:type force_dns_registration: bool
:param ttl_in_seconds: Time to live in seconds for web app's default
domain name.
:type ttl_in_seconds: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -350,10 +329,6 @@ def create_or_update(
resource_group_name=resource_group_name,
name=name,
site_envelope=site_envelope,
skip_dns_registration=skip_dns_registration,
skip_custom_domain_verification=skip_custom_domain_verification,
force_dns_registration=force_dns_registration,
ttl_in_seconds=ttl_in_seconds,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down Expand Up @@ -399,7 +374,7 @@ def get_long_running_output(response):
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'}

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

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

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

def update(
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):
self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config):
"""Creates a new web, mobile, or API app in an existing resource group, or
updates an existing app.

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

# Construct parameters
query_parameters = {}
if skip_dns_registration is not None:
query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool')
if skip_custom_domain_verification is not None:
query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool')
if force_dns_registration is not None:
query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool')
if ttl_in_seconds is not None:
query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand Down

0 comments on commit 6635aea

Please sign in to comment.