8000 The `data` field missing in API spec (collections.yaml) · Issue #1317 · knadh/listmonk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The data field missing in API spec (collections.yaml) #1317
Closed
@stargazer33

Description

@stargazer33

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:
listmonk app_docs_swagger_#Lists_get_lists__list_id

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0