Closed
Description
Version:
The API specification in collections.yaml contains multiple errors:
There are many places where the data
field is missing in the API response.
Here an example (line 700 in collections.yaml):
"/lists/{list_id}":
get:
description: retrieves lists with additional metadata like subscriber counts. This may be slow.
tags:
- Lists
parameters:
- in: path
name: list_id
required: True
description: The id value of the list you want to retreive.
schema:
type: number
responses:
"200":
description: response.
content:
application/json:
schema:
$ref: "#/components/schemas/List"
This creates the following documentation, see screenshot:
But this is all wrong, see the actual response from Listmonk (mind the data
field in response):
{
"data": {
"id": 9,
"created_at": "2023-05-08T19:09:58.043616+02:00",
"updated_at": "2023-05-08T19:09:58.043616+02:00",
"uuid": "d4cb3953-955a-4b24-8b8c-6dcc6df1553f",
"name": "My cool list",
"type": "public",
"optin": "double",
"tags": [
"tag2",
"W"
],
"description": "",
"subscriber_count": 0,
"subscriber_statuses": {},
"subscription_created_at": null,
"subscription_updated_at": null
}
}
There are many places in collections.yaml where the data
field is missing!
I know about these places:
POST /lists
GET /lists/{list_id}
PUT /lists/{list_id}
Please check the collections.yaml, as far as I understand this data
field should be in each and every response