mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-28 19:19:23 +00:00
Use a more generic test for path item object's operations
Get the list of allowed operations from openapi_spec_validator:
b2e439aa79/openapi_spec_validator/validators.py (L157)
This commit is contained in:
parent
49c2330810
commit
48dba2c576
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import logging
|
|||
from functools import lru_cache
|
||||
|
||||
from six import iteritems
|
||||
from openapi_spec_validator.validators import PathItemValidator
|
||||
|
||||
from openapi_core.exceptions import InvalidResponse
|
||||
from openapi_core.parameters import ParametersGenerator
|
||||
|
@ -56,7 +57,7 @@ class OperationsGenerator(object):
|
|||
def generate(self, path_name, path):
|
||||
path_deref = self.dereferencer.dereference(path)
|
||||
for http_method, operation in iteritems(path_deref):
|
||||
if http_method.startswith('x-') or http_method == 'parameters':
|
||||
if http_method not in PathItemValidator.OPERATIONS:
|
||||
continue
|
||||
|
||||
operation_deref = self.dereferencer.dereference(operation)
|
||||
|
|
Loading…
Reference in a new issue