papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

Added support of name for cookies and query parameters in SecurityScheme #115

Closed Szer closed 2 years ago

Szer commented 2 years ago

Fixes https://github.com/papsign/Ktor-OpenAPI-Generator/issues/114

BREAKING CHANGE

Current name is used as a "reference" name to refer to that particular scheme in OpenAPI spec (in yaml or json it is key value of the map containing security schemas)

But spec refers to name as a field in that object with very specific semantic The name of the header, query or cookie parameter to be used.

After this change name will become what it is supposed to be - name of query/header/cookie, and for "reference" name there is a new required field.

This change will break those, who uses name as "reference" name, but it will bring library closer to OpenAPI spec.

Wicpar commented 2 years ago

looks good, i'll merge it at the same times as the other once the question is resolved. Since it's beta i'll just change the minor version.