Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter missing in swagger API spec. (see https://listmonk.app/docs/swagger/collections.yaml ) #1313

Closed
stargazer33 opened this issue May 8, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@stargazer33
Copy link

stargazer33 commented May 8, 2023

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

The collections.yaml contains formal description of
GET /subscribers

  /subscribers:
    get:
      tags:
        - Subscribers
      description: returns all subscribers.
      parameters:
        - in: query
          name: page
          description: number of records to skip
          schema:
            type: integer
            format: int32
        - in: query
          name: per_page
          description: max number of records to return per page
          schema:
            type: integer
            format: int32

The collections.yaml missing the query parameter!

Compare it with the documentation page providing example of GET /subscribers:

GET /api/subscribers
Gets subscribers with an SQL expression.

Example Request
curl -X GET 'http://localhost:9000/api/subscribers' \
    --url-query 'page=1' \
    --url-query 'per_page=100' \
    --url-query "query=subscribers.name LIKE 'Test%' AND subscribers.attribs->>'city' = 'Bengaluru'"

To skip pagination and retrieve all records, pass per_page=all.
@stargazer33 stargazer33 added the bug Something isn't working label May 8, 2023
@knadh knadh added documentation Improvements or additions to documentation and removed bug Something isn't working labels May 8, 2023
@knadh
Copy link
Owner

knadh commented May 8, 2023

Thanks @stargazer33. Please feel free to send a PR with any fixes. I'm not familiar with the OpenAPI spec.

@stargazer33
Copy link
Author

Thanks @stargazer33. Please feel free to send a PR with any fixes. I'm not familiar with the OpenAPI spec.

Well, it is not related to OpenAPI at all, it is about correctness/consistence of documentation for humans and machine-readable documentation in collections.yaml

@knadh
Copy link
Owner

knadh commented May 8, 2023

Indeed. I meant, I'm not familiar with the spec to quickly edit the collection myself.

rohansh-tty added a commit to rohansh-tty/listmonk that referenced this issue May 8, 2023
@knadh knadh closed this as completed in 5a26279 May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants