Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b19f912
Generates separate file for pathparameters
spacether Jul 25, 2023
563f4fc
Adds x_parameters files
spacether Jul 25, 2023
a744766
Fixes typo
spacether Jul 25, 2023
97477d5
Passes body_info into _get_fields_and_body
spacether Jul 25, 2023
defd728
Adds RequestBodyInfo ref linking
spacether Jul 25, 2023
dd00d76
Fixes body types in BodyInfoForX
spacether Jul 26, 2023
0c2f7e7
Fixes one python test
spacether Jul 26, 2023
9ead0dd
Fixes one test
spacether Jul 26, 2023
6a9ab51
Fixes another test
spacether Jul 26, 2023
f973973
Fixes test_body_with_query_params
spacether Jul 26, 2023
b5a7b92
Fixes test_composed_one_of_different_types
spacether Jul 26, 2023
efd60fa
Fixes test_inline_composition
spacether Jul 27, 2023
3c65031
Fixes test_json_patch
spacether Jul 27, 2023
99cc92f
Fixes test_json_with_charset
spacether Jul 27, 2023
d0608fe
Fixes test_mammal, test_missing_or_unset_required_body
spacether Jul 27, 2023
7043129
Fixes two tests
spacether Jul 27, 2023
49a2ceb
Fixes two tests
spacether Jul 27, 2023
482528a
Fixes two tests
spacether Jul 27, 2023
5e63fb0
Fixes two tests
spacether Jul 27, 2023
9088f35
Fixes last python test
spacether Jul 27, 2023
ae63725
Allows body_info to be None
spacether Jul 27, 2023
48130ab
Adds request_body imports for endpoint code sample
spacether Jul 27, 2023
86f6b27
Adds body_info to endpoint docs
spacether Jul 27, 2023
464c20c
Stops generating requestbodyinfo schemas for refed schemas
spacether Jul 27, 2023
7ca1dc9
Dereferences request body schemas
spacether Jul 27, 2023
cc21fcd
Improves refModuleAlias values, prevents collisions based on usages
spacether Jul 27, 2023
029d34a
Samples regenerated
spacether Jul 27, 2023
ee2db6f
Samples actually regenerated
spacether Jul 27, 2023
ba300f6
Fixes test for the nonCOmpliantDiscriminator sample
spacether Jul 27, 2023
76f8fa6
Fixes unit tests
spacether Jul 27, 2023
a1431bd
Runs ensure up to date
spacether Jul 28, 2023
b79a846
Adds content type back in
spacether Jul 28, 2023
b7a3d6a
Adds content type overload condition branch
spacether Jul 28, 2023
c522aed
Adds per content type operation overloads
spacether Jul 28, 2023
b8c9121
Removes unused getContentTypeToOperation, adds requestBodySchema
spacether Jul 28, 2023
30cabbb
Adds and sets requestBodySchema in CodegenOperation
spacether Jul 28, 2023
518c936
Uses a linkedhashmap to store properties before making requestBodySchema
spacether Jul 28, 2023
6017af3
Uses requestBodySchema.properties to define type hints for operation …
spacether Jul 28, 2023
ee3d00f
Adds request body schema imports at the top of the operation file
spacether Jul 28, 2023
a47cdef
Adds body type hints for operation
spacether Jul 29, 2023
cc152fb
Switches code back to using body + content_type
spacether Jul 29, 2023
5a1d211
FIxes two tests
spacether Jul 29, 2023
0643014
Runs black on file, fixes three tests
spacether Jul 29, 2023
09e0c9c
Fixes 3 tests
spacether Jul 29, 2023
205ff44
Fixes 3 more tests
spacether Jul 29, 2023
a55d78d
Updates operation variable names
spacether Jul 29, 2023
14f4e04
Fixes body schema input type to use refModuleAlias, samples regen
spacether Jul 31, 2023
1d2b216
FIxes unitt est specs
spacether Jul 31, 2023
0efc229
Updates templates to remove RequestBodyInfo
spacether Jul 31, 2023
f77f11d
Samples regenerated
spacether Jul 31, 2023
2e9e67d
Updates operation to directly import query cookie header path param s…
spacether Jul 31, 2023
4276df0
Sets skip_validation to True in _get_used_path
spacether Jul 31, 2023
cc5ac7b
FIxes mypy type errors, improves request body typing
spacether Jul 31, 2023
2893dc0
Samples regen
spacether Jul 31, 2023
efb69c5
Fixes typo
spacether Jul 31, 2023
dbd22bf
Removes unused doc import
spacether Jul 31, 2023
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes test_mammal, test_missing_or_unset_required_body
  • Loading branch information
spacether committed Jul 27, 2023
commit d0608fe51606ceb3850e7612e1522fe73e1a7bd1
8 changes: 5 additions & 3 deletions samples/client/petstore/python/tests_manual/test_fake_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ def test_mammal(self):
mock_request.return_value = self.response(
self.json_bytes(value_simple)
)

api_response = self.api.mammal(body=body)
from petstore_api.paths.fake_refs_mammal.post import request_body
body_info = request_body.RequestBodyInfoForApplicationJson(body)
api_response = self.api.mammal(body_info=body_info)
self.assert_request_called_with(
mock_request,
'http://petstore.swagger.io:80/v2/fake/refs/mammal',
Expand All @@ -232,8 +233,9 @@ def test_missing_or_unset_required_body(self):
with self.assertRaises(TypeError):
self.api.mammal()
# required body may not be unset
from petstore_api.paths.fake_refs_mammal.post import request_body
with self.assertRaises(petstore_api.ApiValueError):
self.api.mammal(body=schemas.unset)
self.api.mammal(body_info=request_body.RequestBodyInfoForApplicationJson(schemas.unset))

def test_missing_or_unset_required_query_parameter(self):
from petstore_api.components.schema.user import User
Expand Down