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

Commit 2987565

Browse files
committed
Adds missing 200 response
1 parent 0173515 commit 2987565

File tree

356 files changed

+6325
-11563
lines changed
  • modules/openapi-json-schema-generator/src/test/resources/3_0/python
  • 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

Some content is hidden

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

356 files changed

+6325
-11563
lines changed

modules/openapi-json-schema-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ paths:
545545
schema:
546546
type: string
547547
responses:
548-
'400':
549-
description: Invalid username supplied
548+
'200':
549+
description: Success
550550
'404':
551551
description: User not found
552552
/fake_classname_test:

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: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod
6767
stream: bool = False,
6868
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
6969
skip_deserialization: typing_extensions.Literal[False] = False,
70-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
71-
...
70+
) -> typing.Union[
71+
ApiResponseFor200,
72+
]: ...
7273

7374
@typing.overload
7475
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
@@ -78,8 +79,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod
7879
stream: bool = False,
7980
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
8081
skip_deserialization: typing_extensions.Literal[True] = True,
81-
) -> api_client.ApiResponseWithoutDeserialization:
82-
...
82+
) -> api_client.ApiResponseWithoutDeserialization: ...
8383

8484
@typing.overload
8585
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
@@ -92,8 +92,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod
9292
) -> typing.Union[
9393
ApiResponseFor200,
9494
api_client.ApiResponseWithoutDeserialization,
95-
]:
96-
...
95+
]: ...
9796

9897
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
9998
self,
@@ -102,11 +101,7 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod
102101
stream: bool = False,
103102
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
104103
skip_deserialization: bool = False,
105-
) -> typing.Union[
106-
ApiResponseFor200,
107-
api_client.ApiResponse,
108-
api_client.ApiResponseWithoutDeserialization,
109-
]:
104+
):
110105
"""
111106
:param skip_deserialization: If true then api_response.response will be set but
112107
api_response.body and api_response.headers will not be deserialized into schema
@@ -164,8 +159,9 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body
164159
stream: bool = False,
165160
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
166161
skip_deserialization: typing_extensions.Literal[False] = False,
167-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
168-
...
162+
) -> typing.Union[
163+
ApiResponseFor200,
164+
]: ...
169165

170166
@typing.overload
171167
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
@@ -175,8 +171,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body
175171
stream: bool = False,
176172
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
177173
skip_deserialization: typing_extensions.Literal[True] = True,
178-
) -> api_client.ApiResponseWithoutDeserialization:
179-
...
174+
) -> api_client.ApiResponseWithoutDeserialization: ...
180175

181176
@typing.overload
182177
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
@@ -189,8 +184,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body
189184
) -> typing.Union[
190185
ApiResponseFor200,
191186
api_client.ApiResponseWithoutDeserialization,
192-
]:
193-
...
187+
]: ...
194188

195189
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
196190
self,
@@ -199,11 +193,7 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body
199193
stream: bool = False,
200194
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
201195
skip_deserialization: bool = False,
202-
) -> typing.Union[
203-
ApiResponseFor200,
204-
api_client.ApiResponse,
205-
api_client.ApiResponseWithoutDeserialization,
206-
]:
196+
):
207197
return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
208198
body=body,
209199
content_type=content_type,
@@ -224,8 +214,9 @@ def post(
224214
stream: bool = False,
225215
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
226216
skip_deserialization: typing_extensions.Literal[False] = False,
227-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
228-
...
217+
) -> typing.Union[
218+
ApiResponseFor200,
219+
]: ...
229220

230221
@typing.overload
231222
def post(
@@ -235,8 +226,7 @@ def post(
235226
stream: bool = False,
236227
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
237228
skip_deserialization: typing_extensions.Literal[True] = True,
238-
) -> api_client.ApiResponseWithoutDeserialization:
239-
...
229+
) -> api_client.ApiResponseWithoutDeserialization: ...
240230

241231
@typing.overload
242232
def post(
@@ -249,8 +239,7 @@ def post(
249239
) -> typing.Union[
250240
ApiResponseFor200,
251241
api_client.ApiResponseWithoutDeserialization,
252-
]:
253-
...
242+
]: ...
254243

255244
def post(
256245
self,
@@ -259,11 +248,7 @@ def post(
259248
stream: bool = False,
260249
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
261250
skip_deserialization: bool = False,
262-
) -> typing.Union[
263-
ApiResponseFor200,
264-
api_client.ApiResponse,
265-
api_client.ApiResponseWithoutDeserialization,
266-
]:
251+
):
267252
return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
268253
body=body,
269254
content_type=content_type,

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: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ class BaseApi(api_client.Api):
6262
stream: bool = False,
6363
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
6464
skip_deserialization: typing_extensions.Literal[False] = False,
65-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
66-
...
65+
) -> typing.Union[
66+
ApiResponseFor200,
67+
]: ...
6768

6869
@typing.overload
6970
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
@@ -73,8 +74,7 @@ class BaseApi(api_client.Api):
7374
stream: bool = False,
7475
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
7576
skip_deserialization: typing_extensions.Literal[True] = True,
76-
) -> api_client.ApiResponseWithoutDeserialization:
77-
...
77+
) -> api_client.ApiResponseWithoutDeserialization: ...
7878

7979
@typing.overload
8080
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
@@ -87,8 +87,7 @@ class BaseApi(api_client.Api):
8787
) -> typing.Union[
8888
ApiResponseFor200,
8989
api_client.ApiResponseWithoutDeserialization,
90-
]:
91-
...
90+
]: ...
9291

9392
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
9493
self,
@@ -97,11 +96,7 @@ class BaseApi(api_client.Api):
9796
stream: bool = False,
9897
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
9998
skip_deserialization: bool = False,
100-
) -> typing.Union[
101-
ApiResponseFor200,
102-
api_client.ApiResponse,
103-
api_client.ApiResponseWithoutDeserialization,
104-
]:
99+
):
105100
"""
106101
:param skip_deserialization: If true then api_response.response will be set but
107102
api_response.body and api_response.headers will not be deserialized into schema
@@ -159,8 +154,9 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
159154
stream: bool = False,
160155
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
161156
skip_deserialization: typing_extensions.Literal[False] = False,
162-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
163-
...
157+
) -> typing.Union[
158+
ApiResponseFor200,
159+
]: ...
164160

165161
@typing.overload
166162
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
@@ -170,8 +166,7 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
170166
stream: bool = False,
171167
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
172168
skip_deserialization: typing_extensions.Literal[True] = True,
173-
) -> api_client.ApiResponseWithoutDeserialization:
174-
...
169+
) -> api_client.ApiResponseWithoutDeserialization: ...
175170

176171
@typing.overload
177172
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
@@ -184,8 +179,7 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
184179
) -> typing.Union[
185180
ApiResponseFor200,
186181
api_client.ApiResponseWithoutDeserialization,
187-
]:
188-
...
182+
]: ...
189183

190184
def post_additionalproperties_allows_a_schema_which_should_validate_request_body(
191185
self,
@@ -194,11 +188,7 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp
194188
stream: bool = False,
195189
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
196190
skip_deserialization: bool = False,
197-
) -> typing.Union[
198-
ApiResponseFor200,
199-
api_client.ApiResponse,
200-
api_client.ApiResponseWithoutDeserialization,
201-
]:
191+
):
202192
return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
203193
body=body,
204194
content_type=content_type,
@@ -219,8 +209,9 @@ class ApiForpost(BaseApi):
219209
stream: bool = False,
220210
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
221211
skip_deserialization: typing_extensions.Literal[False] = False,
222-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
223-
...
212+
) -> typing.Union[
213+
ApiResponseFor200,
214+
]: ...
224215

225216
@typing.overload
226217
def post(
@@ -230,8 +221,7 @@ class ApiForpost(BaseApi):
230221
stream: bool = False,
231222
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
232223
skip_deserialization: typing_extensions.Literal[True] = True,
233-
) -> api_client.ApiResponseWithoutDeserialization:
234-
...
224+
) -> api_client.ApiResponseWithoutDeserialization: ...
235225

236226
@typing.overload
237227
def post(
@@ -244,8 +234,7 @@ class ApiForpost(BaseApi):
244234
) -> typing.Union[
245235
ApiResponseFor200,
246236
api_client.ApiResponseWithoutDeserialization,
247-
]:
248-
...
237+
]: ...
249238

250239
def post(
251240
self,
@@ -254,11 +243,7 @@ class ApiForpost(BaseApi):
254243
stream: bool = False,
255244
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
256245
skip_deserialization: bool = False,
257-
) -> typing.Union[
258-
ApiResponseFor200,
259-
api_client.ApiResponse,
260-
api_client.ApiResponseWithoutDeserialization,
261-
]:
246+
):
262247
return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
263248
body=body,
264249
content_type=content_type,

0 commit comments

Comments
 (0)