openapi-core/openapi_core/schema/paths/models.py
2019-03-08 10:19:09 +01:00

13 lines
377 B
Python

"""OpenAPI core paths models module"""
class Path(object):
"""Represents an OpenAPI Path."""
def __init__(self, name, operations, parameters=None):
self.name = name
self.operations = dict(operations)
self.parameters = dict(parameters) if parameters else {}
def __getitem__(self, http_method):
return self.operations[http_method]