swag-payments/spec
2024-07-02 13:43:10 +03:00
..
code_samples ITS-21: Prepare for the release (#31) 2017-02-06 15:09:03 +03:00
definitions TD-933: Adds support for deviation direction for amount randomization (#93) 2024-07-02 13:43:10 +03:00
paths remove payout 2024-06-25 18:10:14 +03:00
wsd Drop dead links and clean up spec description (#15) 2022-01-31 16:41:19 +03:00
README.md ITS-21: Prepare for the release (#31) 2017-02-06 15:09:03 +03:00
swagger.yaml remove payout 2024-06-25 18:10:14 +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"