openapi-core/openapi_core/schema/paths/models.py
2018-05-25 11:30:50 +01:00

12 lines
295 B
Python

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