openapi-preprocessor
openapi-preprocessor copied to clipboard
securitySchemes is being cleared
Hey @dolmen, I noticed an issue with my doc after running preprocessing. I have the following config in yml:
security:
- httpBasic: []
....
components:
securitySchemes:
httpBasic:
type: http
scheme: basic
Once I run the preprocessing, the resulting json is
"components" : {
....
"securitySchemes" : { }
}
"security" : [ {
"httpBasic" : [ ]
} ],
As you see securitySchemes is being cleared.
I'm having the same issue, just opened a PR for this.
In fact /components/securitySchemes are not referenced via $ref. So we need a different algorithm to detect references.
Related issues about OpenAPI design:
- OAI/OpenAPI-Specification#3776
- OAI/OpenAPI-Specification#1972