mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-22 03:00:10 +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
e451c9f10c
commit
42923990ed
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