From 75d10c888ad4472fd55de50092fe5db370a0e96e Mon Sep 17 00:00:00 2001 From: Jefftree Date: Thu, 28 Sep 2023 12:37:47 -0400 Subject: [PATCH] Add security requirement to root OpenAPI --- pkg/spec3/spec.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/spec3/spec.go b/pkg/spec3/spec.go index 43613519f..48fbfc121 100644 --- a/pkg/spec3/spec.go +++ b/pkg/spec3/spec.go @@ -36,6 +36,8 @@ type OpenAPI struct { Servers []*Server `json:"servers,omitempty"` // Components hold various schemas for the specification Components *Components `json:"components,omitempty"` + // SecurityRequirement holds a declaration of which security mechanisms can be used across the API + SecurityRequirement []map[string][]string `json:"security,omitempty"` // ExternalDocs holds additional external documentation ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` }