swag-analytics/spec
2022-04-14 11:16:12 +03:00
..
code_samples CAPI-381: Port SWAG CAPI V3 to SWAG Analytics API (#1) 2019-09-06 17:43:30 +03:00
definitions Update DigitalWalletDetails w/ respect to swag-payments (#7) 2022-04-14 11:16:12 +03:00
paths Update DigitalWalletDetails w/ respect to swag-payments (#7) 2022-04-14 11:16:12 +03:00
wsd CAPI-381: Port SWAG CAPI V3 to SWAG Analytics API (#1) 2019-09-06 17:43:30 +03:00
README.md CAPI-381: Port SWAG CAPI V3 to SWAG Analytics API (#1) 2019-09-06 17:43:30 +03:00
swagger.yaml Update DigitalWalletDetails w/ respect to swag-payments (#7) 2022-04-14 11:16:12 +03:00

Global headers

In order to minimize duplications you can use headers global object (similar to definitions, responses). During build process all references to global headers will be inlined and headers will be removed form resulting spec so spec will be valid (global headers is not allowed by Swagger spec):

Example:

...
headers:
  Rate-Limit-Limit:
    description: The number of allowed requests in the current period
    type: integer
...
paths:
  /api-keys:
    get:
      summary: Retrieve a list of api keys
      responses:
        200:
          description: A list of api keys was retrieved successfully
          headers:
            Rate-Limit-Limit:
              $ref: "#/headers/Rate-Limit-Limit"