api-spec-converter icon indicating copy to clipboard operation
api-spec-converter copied to clipboard

OpenAPI 3: Support "in: cookie" in securitySchemes

Open danielrentz opened this issue 7 years ago • 4 comments

According to the spec, it is possible to add cookie-based authentication: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#securitySchemeObject https://swagger.io/docs/specification/authentication/cookie-authentication/

But using that with this library results in

message: 'expected ''cookie'' to be equals one of Array [ ''query'', ''header'' ]' context: ['#/', '#/components/securitySchemes/SessionCookie']

danielrentz avatar Oct 01 '18 11:10 danielrentz

I have a vague recollection this was a bug fixed some time ago in swagger2openapi, so should be fixed as part of #182

MikeRalphson avatar Oct 04 '18 17:10 MikeRalphson

Yup, looks like the latest version of oas-validator has cookie in the relevant enum. Once #182 is fixed this should be fixed as well.

rbren avatar Oct 04 '18 17:10 rbren

I believe this is fixed now. Closing.

rbren avatar Apr 12 '19 13:04 rbren

Still happens with v2.8.3

danielrentz avatar Jun 26 '19 14:06 danielrentz