Skip to content

securitySchemes at the operation object level #2451

Open
@nepalez

Description

@nepalez

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$reference. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions