Allow the `x-koha-embed`literal in OpenAPI object definitions
On writing a small patch for bug 34333, I noticed our QA tools reject the presence of x-koha-embed
if it doesn't have the following form:
name: x-koha-embed
We do that to detect the presence of top-level occurences of it at the path level. But in this case I was trying to mention on the object spec that the added attribute is to be requested to the API through an x-koha-embed
header. This style is already used in the codebase:
$ cd api/v1/swagger/definitions
$ git grep embed
ill_request.yaml: description: The linked biblio object (x-koha-embed)
ill_request.yaml: description: The linked comment objects (x-koha-embed)
ill_request.yaml: description: The linked comment objects count (x-koha-embed)
ill_request.yaml: description: The linked extended ill request attributes (x-koha-embed)
ill_request.yaml: description: The linked library object (x-koha-embed)
ill_request.yaml: description: The id_prefix of the request (x-koha-embed)
ill_request.yaml: description: The linked patron object (x-koha-embed)
ill_request.yaml: description: Expanded coded fiels (x-koha-embed)
item_group.yaml: description: A list of items that belong to the volume (x-koha-embed)
I think it is useful to document those attributes like that so I propose to lift this requirement so the literal x-koha-embed
is accepted on a description
.