Closed sigmanil closed 3 years ago
I'll have to look into this later, if you think you can go for a nice way to fix that i'll accept a PR.
For now, my only idea is to make a special handling for that type of data in the serializer, which didn't strike me as particularly nice... 😬 I'll let you know and/or make a pullreq if I get a good idea.
As far as I understand https://swagger.io/docs/specification/authentication/ , the "name" property in security schemes should only be used when type=apiKey. This is enforced by the validator at https://editor.swagger.io/ (at least as far as type=http goes). Ktor-OpenAPI-Generator currently seems to include the name-field for all security scheme types (and the field is non-nullable in
com.papsign.ktor.openapigen.model.security.SecuritySchemeModel
), causing generated documentation to fail validation.