openapi-core/openapi_core/schema/paths/models.py

13 lines
295 B
Python
Raw Normal View History

2018-04-17 12:18:40 +00:00
"""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]