Skip to content

Commit

Permalink
Merge branch 'master' of github.com:i2mint/ju
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwhalen committed Nov 10, 2023
2 parents 92378a6 + 4719e8e commit f5ea0e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions ju/oas.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ def params(self):
(it should usually just be one or the other, not both).
We're calling this 'params' because that's what FastAPI calls it.
"""
schema = {
'type': 'object',
'properties': {},
'required': []
}
schema = {'type': 'object', 'properties': {}, 'required': []}

# Process query and path parameters
for param in self.method_data.get('parameters', []):
Expand All @@ -195,4 +191,4 @@ def params(self):
if 'required' in body_schema:
schema['required'].extend(body_schema['required'])

return schema
return schema
4 changes: 2 additions & 2 deletions ju/tests/oas_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_routes(openapi_spec):
'type': {'type': 'string'},
'limit': {'type': 'integer', 'default': 10},
},
'required': ['type']
'required': ['type'],
}

post_route = routes['post', '/items']
Expand Down Expand Up @@ -133,5 +133,5 @@ def test_routes(openapi_spec):
'name': {'type': 'string'},
'age': {'type': 'integer', 'default': 42},
},
'required': []
'required': [],
}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
root_url = https://github.com/i2mint/
license = apache-2.0
author = OtoSense
version = 0.1.1
version = 0.1.2
description = JSON schema Utils
description_file = README.md
long_description = file:README.md
Expand Down

0 comments on commit f5ea0e7

Please sign in to comment.