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

Commit 6903d8a

Browse files
authored
Adds test_get (#37)
* Adds test_get * Samples regenerated
1 parent 13e0d67 commit 6903d8a

File tree

236 files changed

+5852
-15
lines changed
  • modules/openapi-json-schema-generator/src/main/resources/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.

236 files changed

+5852
-15
lines changed

modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ from . import path
2727
{{> model_templates/schema }}
2828
{{/with}}
2929
{{/each}}
30-
{{#unless isStub}}
3130
RequestRequiredQueryParams = typing_extensions.TypedDict(
3231
'RequestRequiredQueryParams',
3332
{
@@ -58,7 +57,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
5857
{{#each queryParams}}
5958
{{> endpoint_parameter }}
6059
{{/each}}
61-
{{/unless}}
6260
{{/if}}
6361
{{#if headerParams}}
6462
# header params
@@ -67,7 +65,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
6765
{{> model_templates/schema }}
6866
{{/with}}
6967
{{/each}}
70-
{{#unless isStub}}
7168
RequestRequiredHeaderParams = typing_extensions.TypedDict(
7269
'RequestRequiredHeaderParams',
7370
{
@@ -98,7 +95,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
9895
{{#each headerParams}}
9996
{{> endpoint_parameter }}
10097
{{/each}}
101-
{{/unless}}
10298
{{/if}}
10399
{{#if pathParams}}
104100
# path params
@@ -107,7 +103,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
107103
{{> model_templates/schema }}
108104
{{/with}}
109105
{{/each}}
110-
{{#unless isStub}}
111106
RequestRequiredPathParams = typing_extensions.TypedDict(
112107
'RequestRequiredPathParams',
113108
{
@@ -138,7 +133,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
138133
{{#each pathParams}}
139134
{{> endpoint_parameter }}
140135
{{/each}}
141-
{{/unless}}
142136
{{/if}}
143137
{{#if cookieParams}}
144138
# cookie params
@@ -147,7 +141,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
147141
{{> model_templates/schema }}
148142
{{/with}}
149143
{{/each}}
150-
{{#unless isStub}}
151144
RequestRequiredCookieParams = typing_extensions.TypedDict(
152145
'RequestRequiredCookieParams',
153146
{
@@ -178,7 +171,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
178171
{{#each cookieParams}}
179172
{{> endpoint_parameter }}
180173
{{/each}}
181-
{{/unless}}
182174
{{/if}}
183175
{{#with bodyParam}}
184176
# body param
@@ -187,7 +179,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
187179
{{> model_templates/schema }}
188180
{{/with}}
189181
{{/each}}
190-
{{#unless isStub}}
191182

192183

193184
request_body_{{paramName}} = api_client.RequestBody(
@@ -201,7 +192,6 @@ request_body_{{paramName}} = api_client.RequestBody(
201192
required=True,
202193
{{/if}}
203194
)
204-
{{/unless}}
205195
{{/with}}
206196
{{#unless isStub}}
207197
{{#each authMethods}}
@@ -277,7 +267,6 @@ _servers = (
277267
{{> model_templates/schema }}
278268
{{/with}}
279269
{{/each}}
280-
{{#unless isStub}}
281270
{{#if responseHeaders}}
282271
ResponseHeadersFor{{code}} = typing_extensions.TypedDict(
283272
'ResponseHeadersFor{{code}}',
@@ -360,7 +349,6 @@ _response_for_{{code}} = api_client.OpenApiResponse(
360349
]
361350
{{/if}}
362351
)
363-
{{/unless}}
364352
{{/each}}
365353
{{#unless isStub}}
366354
_status_code_to_response = {

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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_allows_a_schema_which_should_valid
3131
SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate
3232

3333

34+
request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_are_allowed_by_default import Addi
3131
SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault
3232

3333

34+
request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_additionalproperties_are_allowed_by_default_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_can_exist_by_itself import Additio
3131
SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself
3232

3333

34+
request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_additionalproperties_can_exist_by_itself_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_should_not_look_in_applicators imp
3131
SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators
3232

3333

34+
request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWit
3131
SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof
3232

3333

34+
request_body_allof_combined_with_anyof_oneof = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_allof_combined_with_anyof_oneof_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.allof import Allof
3131
SchemaForRequestBodyApplicationJson = Allof
3232

3333

34+
request_body_allof = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_allof_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_simple_types import AllofSimpleTypes
3131
SchemaForRequestBodyApplicationJson = AllofSimpleTypes
3232

3333

34+
request_body_allof_simple_types = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_allof_simple_types_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema
3131
SchemaForRequestBodyApplicationJson = AllofWithBaseSchema
3232

3333

34+
request_body_allof_with_base_schema = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_allof_with_base_schema_request_body_oapg(

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySch
3131
SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema
3232

3333

34+
request_body_allof_with_one_empty_schema = api_client.RequestBody(
35+
content={
36+
'application/json': api_client.MediaType(
37+
schema=SchemaForRequestBodyApplicationJson),
38+
},
39+
required=True,
40+
)
41+
42+
43+
@dataclass
44+
class ApiResponseFor200(api_client.ApiResponse):
45+
response: urllib3.HTTPResponse
46+
body: schemas.Unset = schemas.unset
47+
headers: schemas.Unset = schemas.unset
48+
49+
50+
_response_for_200 = api_client.OpenApiResponse(
51+
response_cls=ApiResponseFor200,
52+
)
53+
54+
3455
class BaseApi(api_client.Api):
3556

3657
def _post_allof_with_one_empty_schema_request_body_oapg(

0 commit comments

Comments
 (0)