Skip to content

Commit 97970e2

Browse files
authored
Merge pull request #37 from p1c2u/feature/merge-0.2-branch
merge 0.2.1 changes
2 parents ad54522 + 87c0930 commit 97970e2

File tree

4 files changed

+68
-85
lines changed

4 files changed

+68
-85
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33
matrix:
44
include:
5-
- python: 3.6
65
- python: 3.7
76
- python: 3.8
87
- python: 3.9

openapi_schema_validator/validators.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from attr import attrib, attrs
21
from copy import deepcopy
32

43
from jsonschema import _legacy_validators, _utils, _validators
@@ -72,11 +71,12 @@
7271
)
7372

7473

75-
@attrs
7674
class OAS30Validator(BaseOAS30Validator):
7775

78-
read: bool = attrib(default=None)
79-
write: bool = attrib(default=None)
76+
def __init__(self, *args, **kwargs):
77+
self.read = kwargs.pop('read', None)
78+
self.write = kwargs.pop('write', None)
79+
super(OAS30Validator, self).__init__(*args, **kwargs)
8080

8181
def iter_errors(self, instance, _schema=None):
8282
if _schema is None:
@@ -89,8 +89,7 @@ def iter_errors(self, instance, _schema=None):
8989
'nullable': False,
9090
})
9191

92-
validator = self.evolve(schema=_schema)
93-
return super(OAS30Validator, validator).iter_errors(instance)
92+
return super(OAS30Validator, self).iter_errors(instance, _schema)
9493

9594

9695
class OAS31Validator(BaseOAS31Validator):

0 commit comments

Comments
 (0)