Skip to content

Treat security scheme as case insensitive in JSON schema [Issue #2703] #2706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions schemas/v3.0/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,15 +806,17 @@ definitions:
- description: Bearer
properties:
scheme:
enum: [bearer]
type: string
pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$

- description: Non Bearer
not:
required: [bearerFormat]
properties:
scheme:
not:
enum: [bearer]
type: string
pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$

OAuth2SecurityScheme:
type: object
Expand Down
5 changes: 2 additions & 3 deletions schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -765,16 +765,15 @@ $defs:
type:
const: http
scheme:
const: bearer
type: string
pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$
required:
- type
- scheme
then:
properties:
bearerFormat:
type: string
required:
- scheme

type-oauth2:
if:
Expand Down