Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit ccdd1de

Browse files
committed
Samples updated
1 parent b405635 commit ccdd1de

File tree

351 files changed

+8279
-1765
lines changed
  • samples/openapi3/client
    • 3_0_3_unit_test/python/unit_test_api/paths
      • request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body
      • request_body_post_additionalproperties_are_allowed_by_default_request_body
      • request_body_post_additionalproperties_can_exist_by_itself_request_body
      • request_body_post_additionalproperties_should_not_look_in_applicators_request_body
      • request_body_post_allof_combined_with_anyof_oneof_request_body
      • request_body_post_allof_request_body
      • request_body_post_allof_simple_types_request_body
      • request_body_post_allof_with_base_schema_request_body
      • request_body_post_allof_with_one_empty_schema_request_body
      • request_body_post_allof_with_the_first_empty_schema_request_body
      • request_body_post_allof_with_the_last_empty_schema_request_body
      • request_body_post_allof_with_two_empty_schemas_request_body
      • request_body_post_anyof_complex_types_request_body
      • request_body_post_anyof_request_body
      • request_body_post_anyof_with_base_schema_request_body
      • request_body_post_anyof_with_one_empty_schema_request_body
      • request_body_post_array_type_matches_arrays_request_body
      • request_body_post_boolean_type_matches_booleans_request_body
      • request_body_post_by_int_request_body
      • request_body_post_by_number_request_body
      • request_body_post_by_small_number_request_body
      • request_body_post_date_time_format_request_body
      • request_body_post_email_format_request_body
      • request_body_post_enum_with0_does_not_match_false_request_body
      • request_body_post_enum_with1_does_not_match_true_request_body
      • request_body_post_enum_with_escaped_characters_request_body
      • request_body_post_enum_with_false_does_not_match0_request_body
      • request_body_post_enum_with_true_does_not_match1_request_body
      • request_body_post_enums_in_properties_request_body
      • request_body_post_forbidden_property_request_body
      • request_body_post_hostname_format_request_body
      • request_body_post_integer_type_matches_integers_request_body
      • request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body
      • request_body_post_invalid_string_value_for_default_request_body
      • request_body_post_ipv4_format_request_body
      • request_body_post_ipv6_format_request_body
      • request_body_post_json_pointer_format_request_body
      • request_body_post_maximum_validation_request_body
      • request_body_post_maximum_validation_with_unsigned_integer_request_body
      • request_body_post_maxitems_validation_request_body
      • request_body_post_maxlength_validation_request_body
      • request_body_post_maxproperties0_means_the_object_is_empty_request_body
      • request_body_post_maxproperties_validation_request_body
      • request_body_post_minimum_validation_request_body
      • request_body_post_minimum_validation_with_signed_integer_request_body
      • request_body_post_minitems_validation_request_body
      • request_body_post_minlength_validation_request_body
      • request_body_post_minproperties_validation_request_body
      • request_body_post_nested_allof_to_check_validation_semantics_request_body
      • request_body_post_nested_anyof_to_check_validation_semantics_request_body
      • request_body_post_nested_items_request_body
      • request_body_post_nested_oneof_to_check_validation_semantics_request_body
      • request_body_post_not_more_complex_schema_request_body
      • request_body_post_not_request_body
      • request_body_post_nul_characters_in_strings_request_body
      • request_body_post_null_type_matches_only_the_null_object_request_body
      • request_body_post_number_type_matches_numbers_request_body
      • request_body_post_object_properties_validation_request_body
      • request_body_post_object_type_matches_objects_request_body
      • request_body_post_oneof_complex_types_request_body
      • request_body_post_oneof_request_body
      • request_body_post_oneof_with_base_schema_request_body
      • request_body_post_oneof_with_empty_schema_request_body
      • request_body_post_oneof_with_required_request_body
      • request_body_post_pattern_is_not_anchored_request_body
      • request_body_post_pattern_validation_request_body
      • request_body_post_properties_with_escaped_characters_request_body
      • request_body_post_property_named_ref_that_is_not_a_reference_request_body
      • request_body_post_ref_in_additionalproperties_request_body
      • request_body_post_ref_in_allof_request_body
      • request_body_post_ref_in_anyof_request_body
      • request_body_post_ref_in_items_request_body
      • request_body_post_ref_in_not_request_body
      • request_body_post_ref_in_oneof_request_body
      • request_body_post_ref_in_property_request_body
      • request_body_post_required_default_validation_request_body
      • request_body_post_required_validation_request_body
      • request_body_post_required_with_empty_array_request_body
      • request_body_post_required_with_escaped_characters_request_body
      • request_body_post_simple_enum_validation_request_body
      • request_body_post_string_type_matches_strings_request_body
      • request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body
      • request_body_post_uniqueitems_false_validation_request_body
      • request_body_post_uniqueitems_validation_request_body
      • request_body_post_uri_format_request_body
      • request_body_post_uri_reference_format_request_body
      • request_body_post_uri_template_format_request_body
      • response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types
      • response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types
      • response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types
      • response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types
      • response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types
      • response_body_post_allof_response_body_for_content_types
      • response_body_post_allof_simple_types_response_body_for_content_types
      • response_body_post_allof_with_base_schema_response_body_for_content_types
      • response_body_post_allof_with_one_empty_schema_response_body_for_content_types
      • response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types
      • response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types
      • response_body_post_allof_with_two_empty_schemas_response_body_for_content_types
      • response_body_post_anyof_complex_types_response_body_for_content_types
      • response_body_post_anyof_response_body_for_content_types
      • response_body_post_anyof_with_base_schema_response_body_for_content_types
      • response_body_post_anyof_with_one_empty_schema_response_body_for_content_types
      • response_body_post_array_type_matches_arrays_response_body_for_content_types
      • response_body_post_boolean_type_matches_booleans_response_body_for_content_types
      • response_body_post_by_int_response_body_for_content_types
      • response_body_post_by_number_response_body_for_content_types
      • response_body_post_by_small_number_response_body_for_content_types
      • response_body_post_date_time_format_response_body_for_content_types
      • response_body_post_email_format_response_body_for_content_types
      • response_body_post_enum_with0_does_not_match_false_response_body_for_content_types
      • response_body_post_enum_with1_does_not_match_true_response_body_for_content_types
      • response_body_post_enum_with_escaped_characters_response_body_for_content_types
      • response_body_post_enum_with_false_does_not_match0_response_body_for_content_types
      • response_body_post_enum_with_true_does_not_match1_response_body_for_content_types
      • response_body_post_enums_in_properties_response_body_for_content_types
      • response_body_post_forbidden_property_response_body_for_content_types
      • response_body_post_hostname_format_response_body_for_content_types
      • response_body_post_integer_type_matches_integers_response_body_for_content_types
      • response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types
      • response_body_post_invalid_string_value_for_default_response_body_for_content_types
      • response_body_post_ipv4_format_response_body_for_content_types
      • response_body_post_ipv6_format_response_body_for_content_types
      • response_body_post_json_pointer_format_response_body_for_content_types
      • response_body_post_maximum_validation_response_body_for_content_types
      • response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types
      • response_body_post_maxitems_validation_response_body_for_content_types
      • response_body_post_maxlength_validation_response_body_for_content_types
      • response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types
      • response_body_post_maxproperties_validation_response_body_for_content_types
      • response_body_post_minimum_validation_response_body_for_content_types
      • response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types
      • response_body_post_minitems_validation_response_body_for_content_types
      • response_body_post_minlength_validation_response_body_for_content_types
      • response_body_post_minproperties_validation_response_body_for_content_types
      • response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types
      • response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types
      • response_body_post_nested_items_response_body_for_content_types
      • response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types
      • response_body_post_not_more_complex_schema_response_body_for_content_types
      • response_body_post_not_response_body_for_content_types
      • response_body_post_nul_characters_in_strings_response_body_for_content_types
      • response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types
      • response_body_post_number_type_matches_numbers_response_body_for_content_types
      • response_body_post_object_properties_validation_response_body_for_content_types
      • response_body_post_object_type_matches_objects_response_body_for_content_types
      • response_body_post_oneof_complex_types_response_body_for_content_types
      • response_body_post_oneof_response_body_for_content_types
      • response_body_post_oneof_with_base_schema_response_body_for_content_types
      • response_body_post_oneof_with_empty_schema_response_body_for_content_types
      • response_body_post_oneof_with_required_response_body_for_content_types
      • response_body_post_pattern_is_not_anchored_response_body_for_content_types
      • response_body_post_pattern_validation_response_body_for_content_types
      • response_body_post_properties_with_escaped_characters_response_body_for_content_types
      • response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types
      • response_body_post_ref_in_additionalproperties_response_body_for_content_types
      • response_body_post_ref_in_allof_response_body_for_content_types
      • response_body_post_ref_in_anyof_response_body_for_content_types
      • response_body_post_ref_in_items_response_body_for_content_types
      • response_body_post_ref_in_not_response_body_for_content_types
      • response_body_post_ref_in_oneof_response_body_for_content_types
      • response_body_post_ref_in_property_response_body_for_content_types
      • response_body_post_required_default_validation_response_body_for_content_types
      • response_body_post_required_validation_response_body_for_content_types
      • response_body_post_required_with_empty_array_response_body_for_content_types
      • response_body_post_required_with_escaped_characters_response_body_for_content_types
      • response_body_post_simple_enum_validation_response_body_for_content_types
      • response_body_post_string_type_matches_strings_response_body_for_content_types
      • response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types
      • response_body_post_uniqueitems_false_validation_response_body_for_content_types
      • response_body_post_uniqueitems_validation_response_body_for_content_types
      • response_body_post_uri_format_response_body_for_content_types
      • response_body_post_uri_reference_format_response_body_for_content_types
      • response_body_post_uri_template_format_response_body_for_content_types
    • features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/paths/operators
    • petstore/python/.openapi-generator

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+8279
-1765
lines changed

samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,37 @@ class ApiResponseFor200(api_client.ApiResponse):
5858

5959

6060
class BaseApi(api_client.Api):
61+
@typing.overload
62+
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
63+
self,
64+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
65+
content_type: typing_extensions.Literal["application/json"] = ...,
66+
stream: bool = False,
67+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
68+
skip_deserialization: typing_extensions.Literal[False] = ...,
69+
) -> typing.Union[
70+
ApiResponseFor200,
71+
]: ...
6172

6273
@typing.overload
6374
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
6475
self,
6576
body: typing.Union[SchemaForRequestBodyApplicationJson,],
66-
content_type: str = 'application/json',
77+
content_type: str = ...,
6778
stream: bool = False,
6879
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
6980
skip_deserialization: typing_extensions.Literal[False] = ...,
7081
) -> typing.Union[
7182
ApiResponseFor200,
7283
]: ...
7384

85+
7486
@typing.overload
7587
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
7688
self,
7789
body: typing.Union[SchemaForRequestBodyApplicationJson,],
7890
skip_deserialization: typing_extensions.Literal[True],
79-
content_type: str = 'application/json',
91+
content_type: str = ...,
8092
stream: bool = False,
8193
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
8294
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -85,7 +97,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod
8597
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
8698
self,
8799
body: typing.Union[SchemaForRequestBodyApplicationJson,],
88-
content_type: str = 'application/json',
100+
content_type: str = ...,
89101
stream: bool = False,
90102
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
91103
skip_deserialization: bool = ...,
@@ -155,20 +167,33 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
155167
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
156168
self,
157169
body: typing.Union[SchemaForRequestBodyApplicationJson,],
158-
content_type: str = 'application/json',
170+
content_type: typing_extensions.Literal["application/json"] = ...,
171+
stream: bool = False,
172+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
173+
skip_deserialization: typing_extensions.Literal[False] = ...,
174+
) -> typing.Union[
175+
ApiResponseFor200,
176+
]: ...
177+
178+
@typing.overload
179+
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
180+
self,
181+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
182+
content_type: str = ...,
159183
stream: bool = False,
160184
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
161185
skip_deserialization: typing_extensions.Literal[False] = ...,
162186
) -> typing.Union[
163187
ApiResponseFor200,
164188
]: ...
165189

190+
166191
@typing.overload
167192
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
168193
self,
169194
body: typing.Union[SchemaForRequestBodyApplicationJson,],
170195
skip_deserialization: typing_extensions.Literal[True],
171-
content_type: str = 'application/json',
196+
content_type: str = ...,
172197
stream: bool = False,
173198
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
174199
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -177,7 +202,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body
177202
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
178203
self,
179204
body: typing.Union[SchemaForRequestBodyApplicationJson,],
180-
content_type: str = 'application/json',
205+
content_type: str = ...,
181206
stream: bool = False,
182207
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
183208
skip_deserialization: bool = ...,
@@ -210,20 +235,33 @@ class ApiForpost(BaseApi):
210235
def post(
211236
self,
212237
body: typing.Union[SchemaForRequestBodyApplicationJson,],
213-
content_type: str = 'application/json',
238+
content_type: typing_extensions.Literal["application/json"] = ...,
239+
stream: bool = False,
240+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
241+
skip_deserialization: typing_extensions.Literal[False] = ...,
242+
) -> typing.Union[
243+
ApiResponseFor200,
244+
]: ...
245+
246+
@typing.overload
247+
def post(
248+
self,
249+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
250+
content_type: str = ...,
214251
stream: bool = False,
215252
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
216253
skip_deserialization: typing_extensions.Literal[False] = ...,
217254
) -> typing.Union[
218255
ApiResponseFor200,
219256
]: ...
220257

258+
221259
@typing.overload
222260
def post(
223261
self,
224262
body: typing.Union[SchemaForRequestBodyApplicationJson,],
225263
skip_deserialization: typing_extensions.Literal[True],
226-
content_type: str = 'application/json',
264+
content_type: str = ...,
227265
stream: bool = False,
228266
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
229267
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -232,7 +270,7 @@ def post(
232270
def post(
233271
self,
234272
body: typing.Union[SchemaForRequestBodyApplicationJson,],
235-
content_type: str = 'application/json',
273+
content_type: str = ...,
236274
stream: bool = False,
237275
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
238276
skip_deserialization: bool = ...,

samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,37 @@ _response_for_200 = api_client.OpenApiResponse(
5353

5454

5555
class BaseApi(api_client.Api):
56+
@typing.overload
57+
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
58+
self,
59+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
60+
content_type: typing_extensions.Literal["application/json"] = ...,
61+
stream: bool = False,
62+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
63+
skip_deserialization: typing_extensions.Literal[False] = ...,
64+
) -> typing.Union[
65+
ApiResponseFor200,
66+
]: ...
5667

5768
@typing.overload
5869
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
5970
self,
6071
body: typing.Union[SchemaForRequestBodyApplicationJson,],
61-
content_type: str = 'application/json',
72+
content_type: str = ...,
6273
stream: bool = False,
6374
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
6475
skip_deserialization: typing_extensions.Literal[False] = ...,
6576
) -> typing.Union[
6677
ApiResponseFor200,
6778
]: ...
6879

80+
6981
@typing.overload
7082
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
7183
self,
7284
body: typing.Union[SchemaForRequestBodyApplicationJson,],
7385
skip_deserialization: typing_extensions.Literal[True],
74-
content_type: str = 'application/json',
86+
content_type: str = ...,
7587
stream: bool = False,
7688
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
7789
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -80,7 +92,7 @@ class BaseApi(api_client.Api):
8092
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
8193
self,
8294
body: typing.Union[SchemaForRequestBodyApplicationJson,],
83-
content_type: str = 'application/json',
95+
content_type: str = ...,
8496
stream: bool = False,
8597
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
8698
skip_deserialization: bool = ...,
@@ -150,20 +162,33 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
150162
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
151163
self,
152164
body: typing.Union[SchemaForRequestBodyApplicationJson,],
153-
content_type: str = 'application/json',
165+
content_type: typing_extensions.Literal["application/json"] = ...,
166+
stream: bool = False,
167+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
168+
skip_deserialization: typing_extensions.Literal[False] = ...,
169+
) -> typing.Union[
170+
ApiResponseFor200,
171+
]: ...
172+
173+
@typing.overload
174+
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
175+
self,
176+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
177+
content_type: str = ...,
154178
stream: bool = False,
155179
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
156180
skip_deserialization: typing_extensions.Literal[False] = ...,
157181
) -> typing.Union[
158182
ApiResponseFor200,
159183
]: ...
160184

185+
161186
@typing.overload
162187
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
163188
self,
164189
body: typing.Union[SchemaForRequestBodyApplicationJson,],
165190
skip_deserialization: typing_extensions.Literal[True],
166-
content_type: str = 'application/json',
191+
content_type: str = ...,
167192
stream: bool = False,
168193
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
169194
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -172,7 +197,7 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
172197
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
173198
self,
174199
body: typing.Union[SchemaForRequestBodyApplicationJson,],
175-
content_type: str = 'application/json',
200+
content_type: str = ...,
176201
stream: bool = False,
177202
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
178203
skip_deserialization: bool = ...,
@@ -205,20 +230,33 @@ class ApiForpost(BaseApi):
205230
def post(
206231
self,
207232
body: typing.Union[SchemaForRequestBodyApplicationJson,],
208-
content_type: str = 'application/json',
233+
content_type: typing_extensions.Literal["application/json"] = ...,
234+
stream: bool = False,
235+
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
236+
skip_deserialization: typing_extensions.Literal[False] = ...,
237+
) -> typing.Union[
238+
ApiResponseFor200,
239+
]: ...
240+
241+
@typing.overload
242+
def post(
243+
self,
244+
body: typing.Union[SchemaForRequestBodyApplicationJson,],
245+
content_type: str = ...,
209246
stream: bool = False,
210247
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
211248
skip_deserialization: typing_extensions.Literal[False] = ...,
212249
) -> typing.Union[
213250
ApiResponseFor200,
214251
]: ...
215252

253+
216254
@typing.overload
217255
def post(
218256
self,
219257
body: typing.Union[SchemaForRequestBodyApplicationJson,],
220258
skip_deserialization: typing_extensions.Literal[True],
221-
content_type: str = 'application/json',
259+
content_type: str = ...,
222260
stream: bool = False,
223261
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
224262
) -> api_client.ApiResponseWithoutDeserialization: ...
@@ -227,7 +265,7 @@ class ApiForpost(BaseApi):
227265
def post(
228266
self,
229267
body: typing.Union[SchemaForRequestBodyApplicationJson,],
230-
content_type: str = 'application/json',
268+
content_type: str = ...,
231269
stream: bool = False,
232270
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
233271
skip_deserialization: bool = ...,

0 commit comments

Comments
 (0)