Open API / XML RPC: set Content-Type for schema and add status to responses
These are small improvements that I made while playing with the new SlapOS API:
- harmonize OpenAPI and XML RPC so that they both return a status code in the response body on error;
- set proper Content-Type when method
viewOpenAPIAsJson
is called from the browser; - dump OpenAPI hyperschema with
indent=2
so the raw file is easier to read (like done in XML RPC).
There is still one test to be fixed because I thought that the method getContentType
existed on WSGIResponse, but apparently I will have to use getHeader
instead. Anyway, it is already possible to collect feedback if any. Will merge next week if no concern is raised.