apiaryio / api-elements

API Elements is a structure for describing APIs and the complex data structures used within them.
http://apielements.org/
MIT License
28 stars 10 forks source link

feat: Some changes to the spec related to security #55

Closed pksunkara closed 3 years ago

pksunkara commented 5 years ago

This change is Reviewable

kylef commented 5 years ago

Assuming security is written as following:

security:
  - oauth2: []
  - oauth1: []
    basic: []

Old format

authSchemes:
  element: array
  content:
    - element: OAuth2 Scheme
    - element: OAuth1 Scheme
    - element: Basic

PR's format

authSchemes:
  element: array
  content:
    - element: authSchemeRequirement
      content:
        - element: OAuth2 Scheme
    - element: authSchemeRequirement
      content:
        - element: OAuth1 Scheme
        - element: Basic

Proposed format

authSchemes:
  element: array
  content:
    - element: OAuth2 Scheme
    - element: authSchemeRequirement
      content:
        - element: OAuth1 Scheme
        - element: Basic