Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #92

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ specs. For example, using `Linode's OpenAPI 3 Specification`_ for reference::
# call an operation that requires authentication
linodes = api.call_getLinodeInstances()

# call an opertaion with parameters
# call an operation with parameters
linode = api.call_getLinodeInstance(parameters={"linodeId": 123})

# the models returns are all of the same (generated) type
Expand Down
2 changes: 1 addition & 1 deletion openapi3/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
:param ssl_verify: Decide if to use ssl verification to the requests or not,
in case an str is passed, will be used as the CA.
:type ssl_verify: bool, str, None
:param use_session: Should we use a consistant session between API calls
:param use_session: Should we use a consistent session between API calls
:type use_session: bool
"""
# do this first so super().__init__ can see it
Expand Down
4 changes: 2 additions & 2 deletions openapi3/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _parse_data(self):
self.minLength = self._get("minLength", int)
self.pattern = self._get("pattern", str)
self.maxItems = self._get("maxItems", int)
self.minItems = self._get("minItmes", int)
self.minItems = self._get("minItems", int)
self.required = self._get("required", list)
self.enum = self._get("enum", list)
self.type = self._get("type", str)
Expand Down Expand Up @@ -128,7 +128,7 @@ def get_type(self):
# this is defined in ObjectBase.__init__ as all slots are
if self._model_type is None: # pylint: disable=access-member-before-definition
type_name = self.title or self.path[-1]
# if there are no defined properites for this model, use an empty dict
# if there are no defined properties for this model, use an empty dict
# to allow the model to be set up correctly
model_properties = self.properties or {}

Expand Down
2 changes: 1 addition & 1 deletion tests/fastapi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def test_deletePet(event_loop, server, client):
async def test_getPetUnexpectedResponse(event_loop, server, client):
"""
Tests that undeclared response codes raise the correct UnexpectedResponseError
with the relevant inforamtion included.
with the relevant information included.
"""
with pytest.raises(
openapi3.UnexpectedResponseError,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/example_array.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# this is a valid spec that contains a schema with an array as the value of an
# exmaple object
# example object
openapi: "3.1.0"
info:
version: 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/with-broken-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ paths:
'200':
description: This has links
content:
applicaton/json:
application/json:
schema:
type: object
properties:
Expand All @@ -31,7 +31,7 @@ paths:
'200':
description: This has links too
content:
applicaton/json:
application/json:
schema:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/with-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ paths:
'200':
description: This has links
content:
applicaton/json:
application/json:
schema:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions tests/parsing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_parsing_fails(broken):
spec = OpenAPI(broken)


def test_parsing_broken_refernece(broken_reference):
def test_parsing_broken_reference(broken_reference):
"""
Tests that parsing fails correctly when a reference is broken
"""
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_securityparameters(with_securityparameters):

def test_example_type_array(with_array_example):
"""
Tests that examples, definied as "any" type, accept arrays
Tests that examples, defined as "any" type, accept arrays
"""
spec = OpenAPI(with_array_example, validate=True)
assert len(spec.errors()) == 0, spec.errors()
Expand Down
2 changes: 1 addition & 1 deletion tests/ref_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_ref_allof_handling(with_ref_allof):
# paths['/allof-example']get.responses['200'].content['application/json'].schema
# should not modify the component
assert len(referenced_schema.properties) == 1, \
"Unexpectedly found {} properties on componenets.schemas['Example']: {}".format(
"Unexpectedly found {} properties on components.schemas['Example']: {}".format(
len(referenced_schema.properties),
", ".join(referenced_schema.properties.keys()),
)
Expand Down