mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-28 19:19:52 +00:00
17 lines
390 B
Python
17 lines
390 B
Python
|
from dictpath.paths import AccessorPath
|
||
|
|
||
|
from openapi_core.spec.accessors import SpecAccessor
|
||
|
|
||
|
SPEC_SEPARATOR = '#'
|
||
|
|
||
|
|
||
|
class SpecPath(AccessorPath):
|
||
|
|
||
|
@classmethod
|
||
|
def from_spec(
|
||
|
cls, spec_dict, dereferencer=None, *args,
|
||
|
separator=SPEC_SEPARATOR,
|
||
|
):
|
||
|
accessor = SpecAccessor(spec_dict, dereferencer)
|
||
|
return cls(accessor, *args, separator=separator)
|