Description
Hi!
Recently I tried to extract a single-path schema from a schema describing a whole API -- to return that sub-schema in response to OPTIONS
request and make the API paths a sort of self-desribing. What I do is "dereference" the schema, denormalize shared definitions for servers and parameters, and slice only one path object from the whole "paths".
Ideally, I would expect no components
in my sub-schema after de$ref
erence. Unfortunately, I've soon recognized that, unlike other definitions, a securitySchemes
is presented inside the components
only. There's no place for that definitions at the operation level, so that I cannot "denormalize" this part.
This seems a bit weird, and I'd like to ask, why? I mean, why couldn't we add the same property for securitySchemes
to the operation object, which would redefine the corresponding definitions from the "components", or contain a "$ref" to those root definitions? This seems to be more consistent with the schema design.