Hi,
this is my first post but i hope i’ll get an answer to my problem.
I’m writing a central middle-ware solution which should use the OpenAPI V 3.0 standard.
The API is quite extensive so i tried to export the API to swagger JSON format.
It works, but the valid response items are missing.
I found the RABL files, but would love to save hours by parsing the RABL files and convert it to JSON.
E.g. /tasks/{id} Swagger output
"/tasks/{id}": {
"get": {
"tags": [
"foreman_tasks"
],
"consumes": [
"application/x-www-form-urlencoded",
"multipart/form-data"
],
"operationId": "get_tasks_id",
"summary": "Show task details",
"parameters": [
{
"name": "id",
"type": "string",
"in": "path",
"required": true,
"description": "UUID of the task"
},
{
"name": "location_id",
"type": "number",
"in": "query",
"description": "Set the current location context for the request"
},
{
"name": "organization_id",
"type": "number",
"in": "query",
"description": "Set the current organization context for the request"
}
],
"responses": {
"200": {
"description": "ok"
}
},
"description": ""
}
}
What is missing is the response item format. Like:
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pets": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
Please give some advice how i can get the valid response objects using the rake api swagger export.
Any help would be greatly appreciated !
Greets
Franz