From 638d7eb06b65f1171e1f5dc196b0f1ef78b80c49 Mon Sep 17 00:00:00 2001 From: Steve Livengood Date: Thu, 9 Sep 2021 09:19:38 -0700 Subject: [PATCH] Treat security scheme as case insensitive --- schemas/v3.0/schema.yaml | 6 ++++-- schemas/v3.1/schema.yaml | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 7c70ec8cab..babc5c5f37 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -806,7 +806,8 @@ definitions: - description: Bearer properties: scheme: - enum: [bearer] + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ - description: Non Bearer not: @@ -814,7 +815,8 @@ definitions: properties: scheme: not: - enum: [bearer] + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ OAuth2SecurityScheme: type: object diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 39b90f34de..b09e617f29 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -765,7 +765,8 @@ $defs: type: const: http scheme: - const: bearer + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ required: - type - scheme @@ -773,8 +774,6 @@ $defs: properties: bearerFormat: type: string - required: - - scheme type-oauth2: if: