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

Description

@stargazer33

Version:
latest, see https://listmonk.app/docs/swagger/collections.yaml

After fixing #1317 still there are problems in the *.yml file.

Now the data field added to JSON response (everywhere?). This is great.
What is not great - the data field still exists in some response objects/structures.
It looks like the response should contain the data two times, which is not the case!

I know about these places:

These two places: it is definetly a bug:
Line 3106 (in collections.yaml):

    Campaign:
      type: object
      properties:
        data:
          type: object
          properties:

Line 3168:

    NewCampaign:
      type: object
      properties:
        data:

These two places: I'm not sure, please compare with real JSON response/test:
Line 2751:

    Settings:
      type: object
      properties:
        data:
    Bounce:
      type: object
      properties:
        data:

Some additional info
Having collections.yaml is a great help, thanks to the authors!
I'm using it to generate client API in Java (need this API to talk to Listmonk from my program. I'm using/creating subscribers, campaigns and lists, nothing else)

It seems, this API spec -I mean the *.yml file- is not used in development of Listmonk server/client code (otherwise these bugs would be fixed very quickly).
I would suggest to setup some (half)automated check to compare the API described in *.yml with real JSONs used on server/client side.
Without such check - it is a never ending story, there always be bugs

There are tools for this, look here: https://openapi.tools/#description-validators
One of these tools, vacuum written in Go by the way :-)

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