From 91c1c0b03628622667bdf04c7e02f593dd731ab4 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 12 Jun 2024 07:08:07 +0800 Subject: [PATCH] Remove unnecessary doc for model which is only used for output (#2629) --- .chronus/changes/add-usage-2024-5-11-16-39-4.md | 8 ++++++++ .../autorest/codegen/models/model_type.py | 15 +++++++++++++++ .../codegen/templates/model_dpg.py.jinja2 | 2 ++ packages/typespec-python/src/types.ts | 1 + .../authentication/apikey/models/_models.py | 1 - .../authentication/http/custom/models/_models.py | 1 - .../authentication/oauth2/models/_models.py | 1 - .../clientgenerator/core/access/models/_models.py | 11 ----------- .../specs/azure/core/basic/models/_models.py | 2 -- .../azure/core/lro/standard/models/_models.py | 1 - .../specs/azure/core/traits/models/_models.py | 2 -- .../azure/mgmt/spheredpg/models/_models.py | 3 --- .../azurecore/lro/rpc/models/_models.py | 3 --- .../payload/contentnegotiation/models/_models.py | 1 - .../payload/pageable/models/_models.py | 1 - .../model/singlediscriminator/models/_models.py | 2 -- .../typetest/model/usage/models/_models.py | 1 - .../typetest/union/models/_models.py | 10 ---------- .../authentication/apikey/models/_models.py | 1 - .../authentication/http/custom/models/_models.py | 1 - .../authentication/oauth2/models/_models.py | 1 - .../payload/contentnegotiation/models/_models.py | 1 - .../payload/pageable/models/_models.py | 1 - .../model/singlediscriminator/models/_models.py | 2 -- .../typetest/model/usage/models/_models.py | 1 - .../typetest/union/models/_models.py | 10 ---------- 26 files changed, 26 insertions(+), 58 deletions(-) create mode 100644 .chronus/changes/add-usage-2024-5-11-16-39-4.md diff --git a/.chronus/changes/add-usage-2024-5-11-16-39-4.md b/.chronus/changes/add-usage-2024-5-11-16-39-4.md new file mode 100644 index 00000000000..990536c1eaa --- /dev/null +++ b/.chronus/changes/add-usage-2024-5-11-16-39-4.md @@ -0,0 +1,8 @@ +--- +changeKind: internal +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Remove unnecessary doc for model which is only used for output \ No newline at end of file diff --git a/packages/autorest.python/autorest/codegen/models/model_type.py b/packages/autorest.python/autorest/codegen/models/model_type.py index f113ac7604b..4fdf393a950 100644 --- a/packages/autorest.python/autorest/codegen/models/model_type.py +++ b/packages/autorest.python/autorest/codegen/models/model_type.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +from enum import Enum from collections import OrderedDict from typing import Any, Dict, List, Optional, TYPE_CHECKING, cast import sys @@ -24,6 +25,15 @@ from .code_model import CodeModel +class UsageFlags(Enum): + Default = 0 + Input = 2 + Output = 4 + ApiVersionEnum = 8 + JsonMergePatch = 16 + MultipartFormData = 32 + + def _get_properties(type: "ModelType", properties: List[Property]) -> List[Property]: for parent in type.parents: # here we're adding the properties from our parents @@ -72,6 +82,11 @@ def __init__( self.snake_case_name: str = self.yaml_data["snakeCaseName"] self.page_result_model: bool = self.yaml_data.get("pageResultModel", False) self.cross_language_definition_id: Optional[str] = self.yaml_data.get("crossLanguageDefinitionId") + self.usage: int = self.yaml_data.get("usage", 0) + + @property + def is_usage_output(self) -> bool: + return self.usage == UsageFlags.Output.value @property def flattened_property(self) -> Optional[Property]: diff --git a/packages/autorest.python/autorest/codegen/templates/model_dpg.py.jinja2 b/packages/autorest.python/autorest/codegen/templates/model_dpg.py.jinja2 index 048de17212c..afffb7f94e5 100644 --- a/packages/autorest.python/autorest/codegen/templates/model_dpg.py.jinja2 +++ b/packages/autorest.python/autorest/codegen/templates/model_dpg.py.jinja2 @@ -14,8 +14,10 @@ {% endif %} {% if (model.properties | selectattr('optional', "equalto", false) | first) is defined %} + {% if not model.is_usage_output %} All required parameters must be populated in order to send to server. {% endif %} + {% endif %} {% if model.properties != None %} {% for p in model.properties %} diff --git a/packages/typespec-python/src/types.ts b/packages/typespec-python/src/types.ts index 535cdb08a1f..faded4b4445 100644 --- a/packages/typespec-python/src/types.ts +++ b/packages/typespec-python/src/types.ts @@ -219,6 +219,7 @@ function emitModel( base: type.isGeneratedName && fromBody ? "json" : "dpg", internal: type.access === "internal", crossLanguageDefinitionId: type.crossLanguageDefinitionId, + usage: type.usage, }; typesMap.set(type, newValue); diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py index 628c2d9047c..686832c5e2f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py index 628c2d9047c..686832c5e2f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py index 628c2d9047c..686832c5e2f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py index dcba9bfb323..b50c2bf4004 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py @@ -23,7 +23,6 @@ class AbstractModel(_model_base.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: RealModel - All required parameters must be populated in order to send to server. :ivar kind: Required. Default value is None. :vartype kind: str @@ -41,7 +40,6 @@ class AbstractModel(_model_base.Model): class BaseModel(_model_base.Model): """Used in internal operations, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -54,7 +52,6 @@ class BaseModel(_model_base.Model): class InnerModel(_model_base.Model): """Used in internal operations, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -67,7 +64,6 @@ class InnerModel(_model_base.Model): class InternalDecoratorModelInInternal(_model_base.Model): """Used in an internal operation, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -80,7 +76,6 @@ class InternalDecoratorModelInInternal(_model_base.Model): class NoDecoratorModelInInternal(_model_base.Model): """Used in an internal operation, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -93,7 +88,6 @@ class NoDecoratorModelInInternal(_model_base.Model): class NoDecoratorModelInPublic(_model_base.Model): """Used in a public operation, should be generated and exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -123,7 +117,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class OuterModel(BaseModel): """Used in internal operations, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -138,7 +131,6 @@ class OuterModel(BaseModel): class PublicDecoratorModelInInternal(_model_base.Model): """Used in an internal operation but with public decorator, should be generated and exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -168,7 +160,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class PublicDecoratorModelInPublic(_model_base.Model): """Used in a public operation, should be generated and exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -198,7 +189,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class RealModel(AbstractModel, discriminator="real"): """Used in internal operations, should be generated but not exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str @@ -213,7 +203,6 @@ class RealModel(AbstractModel, discriminator="real"): class SharedModel(_model_base.Model): """Used by both public and internal operation. It should be generated and exported. - All required parameters must be populated in order to send to server. :ivar name: Required. :vartype name: str diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py index f0743b767f6..00e9c66cacc 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py @@ -22,7 +22,6 @@ class FirstItem(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. :ivar id: The id of the item. Required. :vartype id: int @@ -67,7 +66,6 @@ class SecondItem(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. :ivar name: The name of the item. Required. :vartype name: str diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py index 3ff18586a68..7685ebcf776 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py @@ -16,7 +16,6 @@ class ExportedUser(_model_base.Model): """The exported user data. - All required parameters must be populated in order to send to server. :ivar name: The name of user. Required. :vartype name: str diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py index 63310893e8e..39aedab4dbc 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py @@ -18,7 +18,6 @@ class User(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. :ivar id: The user's id. Required. :vartype id: int @@ -82,7 +81,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class UserActionResponse(_model_base.Model): """User action response. - All required parameters must be populated in order to send to server. :ivar user_action_result: User action result. Required. :vartype user_action_result: str diff --git a/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/models/_models.py b/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/models/_models.py index 28ab6462388..029671f8253 100644 --- a/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/models/_models.py @@ -344,7 +344,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class CountElementsResponse(_model_base.Model): """Response of the count for elements. - All required parameters must be populated in order to send to server. :ivar value: Number of children resources in parent resource. Required. :vartype value: int @@ -374,7 +373,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class CountDevicesResponse(CountElementsResponse): """Response to the action call for count devices in a catalog. - All required parameters must be populated in order to send to server. :ivar value: Number of children resources in parent resource. Required. :vartype value: int @@ -735,7 +733,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class DeviceInsight(_model_base.Model): """Device insight report. - All required parameters must be populated in order to send to server. :ivar device_id: Device ID. Required. :vartype device_id: str diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py index ccd4d53fd8e..e3a5c34c7f6 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py @@ -20,7 +20,6 @@ class Error(_model_base.Model): """The error object. - All required parameters must be populated in order to send to server. :ivar code: One of a server-defined set of error codes. Required. :vartype code: str @@ -103,7 +102,6 @@ class GenerationResponse(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. :ivar id: The unique ID of the operation. Required. :vartype id: str @@ -149,7 +147,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GenerationResult(_model_base.Model): """Result of the generation. - All required parameters must be populated in order to send to server. :ivar data: The data. Required. :vartype data: str diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py index 3830cdebf9d..494ca7fe6b9 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py @@ -16,7 +16,6 @@ class PngImageAsJson(_model_base.Model): """PngImageAsJson. - All required parameters must be populated in order to send to server. :ivar content: Required. :vartype content: bytes diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py index 6526110ff37..049927c4388 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py @@ -16,7 +16,6 @@ class User(_model_base.Model): """User model. - All required parameters must be populated in order to send to server. :ivar name: User name. Required. :vartype name: str diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py index da760f45728..cc0574a07c2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py @@ -63,7 +63,6 @@ class Dinosaur(_model_base.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: TRex - All required parameters must be populated in order to send to server. :ivar kind: Required. Default value is None. :vartype kind: str @@ -240,7 +239,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class TRex(Dinosaur, discriminator="t-rex"): """The second level legacy model in polymorphic single level inheritance. - All required parameters must be populated in order to send to server. :ivar size: Required. :vartype size: int diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py index 9cb337ae741..4007ec4f71d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py @@ -76,7 +76,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class OutputRecord(_model_base.Model): """Record used in operation return type. - All required parameters must be populated in order to send to server. :ivar required_prop: Required. :vartype required_prop: str diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py index 85dedd6982c..9996952f288 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py @@ -126,7 +126,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse(_model_base.Model): """GetResponse. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.MixedTypesCases @@ -156,7 +155,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse1(_model_base.Model): """GetResponse1. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.MixedLiteralsCases @@ -186,7 +184,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse2(_model_base.Model): """GetResponse2. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.StringAndArrayCases @@ -216,7 +213,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse3(_model_base.Model): """GetResponse3. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.EnumsOnlyCases @@ -246,7 +242,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse4(_model_base.Model): """GetResponse4. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is either a Cat type or a Dog type. :vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog @@ -276,7 +271,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse5(_model_base.Model): """GetResponse5. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: float, float, float :vartype prop: float or float or float @@ -306,7 +300,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse6(_model_base.Model): """GetResponse6. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3] :vartype prop: int or int or int @@ -336,7 +329,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse7(_model_base.Model): """GetResponse7. - All required parameters must be populated in order to send to server. :ivar prop: Required. Known values are: "b" and "c". :vartype prop: str or ~typetest.union.models.StringExtensibleNamedUnion @@ -366,7 +358,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse8(_model_base.Model): """GetResponse8. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal["b"], Literal["c"], str :vartype prop: str or str or str @@ -396,7 +387,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse9(_model_base.Model): """GetResponse9. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"] :vartype prop: str or str or str diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py index 37896dc9605..55d9056bc2b 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py index 37896dc9605..55d9056bc2b 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py index 37896dc9605..55d9056bc2b 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py @@ -16,7 +16,6 @@ class InvalidAuth(_model_base.Model): """InvalidAuth. - All required parameters must be populated in order to send to server. :ivar error: Required. :vartype error: str diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py index d307971ead0..ed763a479ca 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py @@ -16,7 +16,6 @@ class PngImageAsJson(_model_base.Model): """PngImageAsJson. - All required parameters must be populated in order to send to server. :ivar content: Required. :vartype content: bytes diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py index 85a995323c5..fa7c4238166 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py @@ -16,7 +16,6 @@ class User(_model_base.Model): """User model. - All required parameters must be populated in order to send to server. :ivar name: User name. Required. :vartype name: str diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py index cfb6aa70c36..0b4dbda515a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py @@ -63,7 +63,6 @@ class Dinosaur(_model_base.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: TRex - All required parameters must be populated in order to send to server. :ivar kind: Required. Default value is None. :vartype kind: str @@ -240,7 +239,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class TRex(Dinosaur, discriminator="t-rex"): """The second level legacy model in polymorphic single level inheritance. - All required parameters must be populated in order to send to server. :ivar size: Required. :vartype size: int diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py index 3358e746dc1..0170ae50786 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py @@ -76,7 +76,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class OutputRecord(_model_base.Model): """Record used in operation return type. - All required parameters must be populated in order to send to server. :ivar required_prop: Required. :vartype required_prop: str diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py index d0e37edd9c2..be588e55afb 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py @@ -126,7 +126,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse(_model_base.Model): """GetResponse. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.MixedTypesCases @@ -156,7 +155,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse1(_model_base.Model): """GetResponse1. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.MixedLiteralsCases @@ -186,7 +184,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse2(_model_base.Model): """GetResponse2. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.StringAndArrayCases @@ -216,7 +213,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse3(_model_base.Model): """GetResponse3. - All required parameters must be populated in order to send to server. :ivar prop: Required. :vartype prop: ~typetest.union.models.EnumsOnlyCases @@ -246,7 +242,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse4(_model_base.Model): """GetResponse4. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is either a Cat type or a Dog type. :vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog @@ -276,7 +271,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse5(_model_base.Model): """GetResponse5. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: float, float, float :vartype prop: float or float or float @@ -306,7 +300,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse6(_model_base.Model): """GetResponse6. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3] :vartype prop: int or int or int @@ -336,7 +329,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse7(_model_base.Model): """GetResponse7. - All required parameters must be populated in order to send to server. :ivar prop: Required. Known values are: "b" and "c". :vartype prop: str or ~typetest.union.models.StringExtensibleNamedUnion @@ -366,7 +358,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse8(_model_base.Model): """GetResponse8. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal["b"], Literal["c"], str :vartype prop: str or str or str @@ -396,7 +387,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GetResponse9(_model_base.Model): """GetResponse9. - All required parameters must be populated in order to send to server. :ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"] :vartype prop: str or str or str