openapi-core/openapi_core/schema/parameters/enums.py

26 lines
508 B
Python
Raw Normal View History

2018-04-17 12:18:40 +00:00
"""OpenAPI core parameters enums module"""
2017-11-14 11:28:45 +00:00
from enum import Enum
class ParameterLocation(Enum):
PATH = 'path'
QUERY = 'query'
HEADER = 'header'
COOKIE = 'cookie'
@classmethod
def has_value(cls, value):
return (any(value == item.value for item in cls))
class ParameterStyle(Enum):
MATRIX = 'matrix'
LABEL = 'label'
FORM = 'form'
SIMPLE = 'simple'
SPACE_DELIMITED = 'spaceDelimited'
PIPE_DELIMITED = 'pipeDelimited'
DEEP_OBJECT = 'deepObject'