Mentions légales du service

Skip to content

register apidocs with each operation

The apidocs for each operation comprise at least seven fields, including a map that defines every response code the operation can produce. Since this information is contained the JSON-formatted OAS specification for the REST API, it is easiest to provide the apidocs in JSON format.

These fragments are easy to extract using jq; for example, POST /constants is

jq -c '.paths."/constants".post' aseba-v1.json

This PR adds an apidocs map parallel to handlers, and a variant registerHandler that accepts apidocs. It also modifies getApidocs to provide global OAS information about the API.

(TODO: include model definitions, for $ref schema references.)

Merge request reports