diff --git a/.chronus/changes/main-2024-5-19-14-16-18.md b/.chronus/changes/main-2024-5-19-14-16-18.md new file mode 100644 index 00000000000..f6510a4c7e4 --- /dev/null +++ b/.chronus/changes/main-2024-5-19-14-16-18.md @@ -0,0 +1,8 @@ +--- +changeKind: fix +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +add visibility support to discriminator rest field \ No newline at end of file diff --git a/packages/autorest.python/autorest/codegen/templates/model_base.py.jinja2 b/packages/autorest.python/autorest/codegen/templates/model_base.py.jinja2 index 386a0a2e2eb..2f415a06ca1 100644 --- a/packages/autorest.python/autorest/codegen/templates/model_base.py.jinja2 +++ b/packages/autorest.python/autorest/codegen/templates/model_base.py.jinja2 @@ -894,5 +894,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-arm-models-resources/azure/arm/models/resources/_model_base.py b/packages/typespec-python/test/azure/generated/azure-arm-models-resources/azure/arm/models/resources/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-arm-models-resources/azure/arm/models/resources/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-arm-models-resources/azure/arm/models/resources/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/_model_base.py b/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-mgmt-spheredpg/azure/mgmt/spheredpg/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/azure/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py index 5cf70733404..43fd8c7e9b1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-flatten/typetest/model/flatten/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeOptional/versioning/madeoptional/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedFrom/versioning/renamedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returnTypeChangedFrom/versioning/returntypechangedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py index 948f464d21b..df2ab5b9745 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typeChangedFrom/versioning/typechangedfrom/_model_base.py @@ -883,5 +883,6 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, ) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility)