turner-townsend / flask-pydantic-spec

An Flask OpenAPI library using Pydantic
Apache License 2.0
98 stars 17 forks source link

How to define security? #30

Open ev-agelos opened 2 years ago

ev-agelos commented 2 years ago
class Headers(BaseModel):
  authorization: str

I tried via validate(header=Headers) but if I use the field authorization or Authorization swagger UI 'try it out" doesnt put the header in the request. When I used another word for it, for example "auth", swagger did put it.