mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-06 17:45:24 +00:00
27a8069f28
* ITS-21: Make the spec ready for ReDoc * ITS-21: Make it possible to define paths in subdirs * ITS-21: Translate tags back to English + abuse x-displayName * ITS-21: Introduce Makefile * ITS-21: Describe analytics operations more * ITS-21: Describe analytics definitions more * ITS-21: Fix tag descriptions a bit * ITS-21: Describe geo operations * ITS-21: Translate common parameter descriptions * ITS-21: Describe invoice/payments operations and definitions * ITS-21 Make shop/party activation/suspension truly idempotent. Fix UpdateShopArgs definition * ITS-21: Describe payments/tokens operations and definitions * ITS-21: Describe invoice.reason property * ITS-21: Describe user interactions * ITS-21: Unskuccaite all the paths backs * ITS-21: Fix warnings + use hack w/ allOf where applicable * ITS-21 Rename all Args to Params * ITS-21 Rename context to metadata
741 B
741 B
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"