Skip to content

Draft: fix(openapi): correct openapi description of the events-api

Sabine Maennel requested to merge audit-trail-api-docs into develop

This fixes the issue: #149 (closed)

@martinfontanet I have tried to use this tool to validate the API spec: https://oas-validation.com/. I was unable to resolve all the issues, but one issue it raised was to add a description to the response.

I struggled to correctly describe the schema as just an structure of two objects without a top level name for the structure.

In my opinion we should go to a structure similar to this for the responses: (similar to what I know from opendata.swiss, see here for example: https://ckan.opendata.swiss/api/3/action/package_show?id=steuerfuss-juristische-personen)

{ "help": "url",
  "success": true, 
  "result": {...}
}

Where result contains the structure of the result. I case of an error it could be similar to this here:

{ "help": "url",
  "success": false, 
  "error": {
  "message": "Not found"
}
Edited by Sabine Maennel

Merge request reports