diff --git a/openapi_python_client/parser/properties/enum_property.py b/openapi_python_client/parser/properties/enum_property.py index fe704eefd..39b89a2bc 100644 --- a/openapi_python_client/parser/properties/enum_property.py +++ b/openapi_python_client/parser/properties/enum_property.py @@ -4,6 +4,7 @@ import attr +from ... import schema as oai from ... import utils from .property import Property from .schemas import Class @@ -22,6 +23,13 @@ class EnumProperty(Property): template: ClassVar[str] = "enum_property.py.jinja" + _allowed_locations: ClassVar[Set[oai.ParameterLocation]] = { + oai.ParameterLocation.QUERY, + oai.ParameterLocation.PATH, + oai.ParameterLocation.COOKIE, + oai.ParameterLocation.HEADER, + } + def get_base_type_string(self) -> str: return self.class_info.name