Skip to content

Commit

Permalink
CodeGen from PR 26545 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Release web 2023 01 01 (Azure#26545)

* Add new api-version 2023-01-01 (Azure#22962)

* Add new api-version 2023-01-01

* Change default package api-version

* Updated workflowstate to be a reference (Azure#23084)

* Fix OneDeploy request and response bodies (Azure#23224)

* Fix OneDeploy request and response bodies

* Fixing typo

* Add Container Apps Environment Id in checknameavailability API (Azure#24102)

Co-authored-by: Vishal Gupta <vishgupta@microsoft.com>

* Add minTlsCipherSuite property (Azure#24198)

* Add minTlsCipherSuite property

* Move to SiteConfig

---------

Co-authored-by: Chris Rosenblatt <crosenblatt@microsoft.com>

* Dapr configuration for a site (Azure#24606)

* Dapr configuration for a site

* removed dapr older definition

* adding back old dapr definition

* Modified 'Dapr' to 'DaprConfig' to resolve conflicts with older dapr definition

* to initiate checks as re-run

* fixed prettier check fail

---------

Co-authored-by: Sushmitha Vangala <svangala@microsoft.com>

* Fix for JS SDK check failure for Dapr Config (Azure#25493)

* Dapr configuration for a site

* removed dapr older definition

* adding back old dapr definition

* Modified 'Dapr' to 'DaprConfig' to resolve conflicts with older dapr definition

* to initiate checks as re-run

* fixed prettier check fail

* JS Sdk check fail fix

---------

Co-authored-by: Sushmitha Vangala <svangala@microsoft.com>

* Release web 2023 01 01 (Azure#25157)

* Adding locations/usages endpoint and example

* Revert "Adding locations/usages endpoint and example"

This reverts commit 4a1110765d08c5c96d65f884237313515d842586.

* Adding back usages changes with up to date branch

* Updates based on verification tools

* Fixing spacing, adding missing comma

* ran prettier-fix for formatting

* Update for new QMS requirements with ZR

* Using prettier to fix linter error

* Adding ZR endpoint

* Fixing duplicate operationId

* QMS Usages

* Validation changes

* Updating schema

* Updating for collection

* fixing pr comments

* Resolving comments

* Updating description

* Resolving comments

---------

Co-authored-by: Rohini Sharma <rohinisharma@microsoft.com>

* Release web 2023 01 01 (Azure#25629)

* Adding locations/usages endpoint and example

* Revert "Adding locations/usages endpoint and example"

This reverts commit 4a1110765d08c5c96d65f884237313515d842586.

* Adding back usages changes with up to date branch

* Updates based on verification tools

* Fixing spacing, adding missing comma

* ran prettier-fix for formatting

* Update for new QMS requirements with ZR

* Using prettier to fix linter error

* Adding ZR endpoint

* Fixing duplicate operationId

* QMS Usages

* Validation changes

* Updating schema

* Updating for collection

* fixing pr comments

* Resolving comments

* Updating description

* Resolving comments

* Removing quota type parameter

---------

Co-authored-by: Rohini Sharma <rohinisharma@microsoft.com>

* Adding workload profile & resource config to Site (Azure#25868)

* Adding workload profile & resource config to Site

* prettier fix

* cosmetic fix

* updating examples

* prettier fix

* Fix Python SDK failure for Dapr log level config (Azure#26198)

* Rename log level enum for dapr

* Fix Python SDK failure for Dapr log level config

* Rename log level num for dapr (Azure#26374)

* Rename log level num for dapr

* Rename log level num for dapr

* initial change to add ase regions (Azure#26333)

* initial change to add ase regions

* addressing comments

* nit adding example as suggested

* formatting code

* add custom word

* prettier everything

* prettier everything

* Revert "Fix OneDeploy request and response bodies (Azure#23224)" (Azure#26580)

This reverts commit 7dfc303ee18440ee5eede155bb0d63797fbdc4bb.

---------

Co-authored-by: Alex Karcher <alkarche@microsoft.com>
Co-authored-by: dannysongg <38927254+dannysongg@users.noreply.github.com>
Co-authored-by: Vishal Gupta <vishalgupta7991@gmail.com>
Co-authored-by: Vishal Gupta <vishgupta@microsoft.com>
Co-authored-by: Chris Rosenblatt <rosench13@gmail.com>
Co-authored-by: Chris Rosenblatt <crosenblatt@microsoft.com>
Co-authored-by: SushmithaVReddy <sushmithavangala@gmail.com>
Co-authored-by: Sushmitha Vangala <svangala@microsoft.com>
Co-authored-by: rohinisharma <rohini2@illinois.edu>
Co-authored-by: Rohini Sharma <rohinisharma@microsoft.com>
Co-authored-by: mukundnigam <34106498+mukundnigam@users.noreply.github.com>
Co-authored-by: Kirstyn Amperiadis <102087132+kamperiadis@users.noreply.github.com>
Co-authored-by: Haochi <136372741+ha0ch1@users.noreply.github.com>
  • Loading branch information
14 people committed Nov 10, 2023
1 parent 4039427 commit 6d8a19a
Show file tree
Hide file tree
Showing 485 changed files with 27,278 additions and 27,783 deletions.
27 changes: 21 additions & 6 deletions sdk/appservice/azure-mgmt-web/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
{
"commit": "969fd0c2634fbcc1975d7abe3749330a5145a97c",
"commit": "69f5096c9558b8f4ecb2b0a0c516a10fce58e03e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.4.3",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/web/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/web/resource-manager/readme.md"
"autorest_command": "autorest specification/web/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/web/resource-manager/readme.md",
"package-2022-09": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2021-03-only": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2021-01-15-only": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2021-01-only": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2020-12-only": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2020-09-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2020-06-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2019-08-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2018-11-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2018-02-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2016-09-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2016-08-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2016-03-only": "2022-12-08 21:38:55 -0800 65106a17de1db38e076ea6f14c0b60305bd27ace Microsoft.Web/stable/2016-03-01/CommonDefinitions.json",
"package-2015-08-only": "fatal: invalid object name 'from'. from: AppServiceCertificateOrders.json",
"package-2015-04-only": "2021-03-07 21:09:45 -0500 19aa203acad715399745b9e2f125889b14934e84 Microsoft.DomainRegistration/stable/2015-04-01/Domains.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------
from ._serialization import Serializer, Deserializer
from io import IOBase
import sys
from typing import Any, IO, Iterable, Optional, Union

Expand Down
36 changes: 25 additions & 11 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if xml_desc.get("attr", False):
if xml_ns:
ET.register_namespace(xml_prefix, xml_ns)
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
serialized.set(xml_name, new_attr) # type: ignore
continue
if xml_desc.get("text", False):
Expand Down Expand Up @@ -664,8 +664,9 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
_serialized.update(_new_attr) # type: ignore
_new_attr = _new_attr[k] # type: ignore
_serialized = _serialized[k]
except ValueError:
continue
except ValueError as err:
if isinstance(err, SerializationError):
raise

except (AttributeError, KeyError, TypeError) as err:
msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj))
Expand Down Expand Up @@ -743,6 +744,8 @@ def query(self, name, data, data_type, **kwargs):
:param data: The data to be serialized.
:param str data_type: The type to be serialized from.
:keyword bool skip_quote: Whether to skip quote the serialized result.
Defaults to False.
:rtype: str
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
Expand All @@ -751,10 +754,8 @@ def query(self, name, data, data_type, **kwargs):
# Treat the list aside, since we don't want to encode the div separator
if data_type.startswith("["):
internal_data_type = data_type[1:-1]
data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data]
if not kwargs.get("skip_quote", False):
data = [quote(str(d), safe="") for d in data]
return str(self.serialize_iter(data, internal_data_type, **kwargs))
do_quote = not kwargs.get('skip_quote', False)
return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs))

# Not a list, regular serialization
output = self.serialize_data(data, data_type, **kwargs)
Expand Down Expand Up @@ -893,6 +894,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
not be None or empty.
:param str div: If set, this str will be used to combine the elements
in the iterable into a combined string. Default is 'None'.
:keyword bool do_quote: Whether to quote the serialized result of each iterable element.
Defaults to False.
:rtype: list, str
"""
if isinstance(data, str):
Expand All @@ -905,9 +908,18 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
for d in data:
try:
serialized.append(self.serialize_data(d, iter_type, **kwargs))
except ValueError:
except ValueError as err:
if isinstance(err, SerializationError):
raise
serialized.append(None)

if kwargs.get('do_quote', False):
serialized = [
'' if s is None else quote(str(s), safe='')
for s
in serialized
]

if div:
serialized = ["" if s is None else str(s) for s in serialized]
serialized = div.join(serialized)
Expand Down Expand Up @@ -952,7 +964,9 @@ def serialize_dict(self, attr, dict_type, **kwargs):
for key, value in attr.items():
try:
serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs)
except ValueError:
except ValueError as err:
if isinstance(err, SerializationError):
raise
serialized[self.serialize_unicode(key)] = None

if "xml" in serialization_ctxt:
Expand Down Expand Up @@ -1273,7 +1287,7 @@ def _extract_name_from_internal_type(internal_type):
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
xml_ns = internal_type_xml_map.get("ns", None)
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
return xml_name


Expand All @@ -1297,7 +1311,7 @@ def xml_key_extractor(attr, attr_desc, data):
# Integrate namespace if necessary
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)

# If it's an attribute, that's simple
if xml_desc.get("attr", False):
Expand Down
Loading

0 comments on commit 6d8a19a

Please sign in to comment.