Skip to content

Commit

Permalink
Treat security scheme as case insensitive (#2706)
Browse files Browse the repository at this point in the history
  • Loading branch information
hornworm61 authored Sep 23, 2021
1 parent 866a4a2 commit f6d3005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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 @@ -767,16 +767,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

0 comments on commit f6d3005

Please sign in to comment.