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

[server] Remove obsolete /count GET, apiDoc improvements #883

Merged
merged 10 commits into from
May 26, 2022

Conversation

ix5
Copy link
Member

@ix5 ix5 commented May 25, 2022

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

  • views: comments: Remove obsolete /count GET endpoint
    The REMOVEME has been in the code for quite a while and a better substitute exists.
  • apidoc: footer: Make instructions clearer
  • apidoc: Expand header information
  • apidoc.json: Back to 0.13.0, compare
  • apiDoc fails to parse a non-semantic version
  • docs: Add apidoc sample image
  • Makefile: apidoc: Also copy to docs output dir
  • docs: api: Rework section, point to apiDoc directly
    All endpoints should now be properly documented using apidoc. As such, remove duplication and point directly to the needed sections.
  • views: comments: Complete API docs, cosmetics
    Every endpoint should now have a full API documentation.
    While at it, clean up some minor functionality
    • .get_json() -> .json property
    • Add better error message for when latest-enabled is
      well... not enabled
  • apidoc: Enable comparison to prev API versions

Why is this necessary?

Cleanup and preparing for some other API changes.

(Previous versions of this PR)

In a previous version of this PR, I added these changes, which I now think merit further thought. Hence removed:

  • [BREAKING] views/comments: /new: Accept only POST
    Mixing query params and POST body is hard to understand, error prone and harder to verify programmatically.
    Since this breaks comment creation if clients continue to only provide uri via query params, mark as BREAKING
  • [BREAKING] js: api: /new: Only send POST body
    In accordance with the previous commit, send all data as POST instead of mixing and matching with query params.

@ix5 ix5 added server (Python) server code bug docs Documentation of the project improvement Not a new feature, but makes Isso more pleasant to use labels May 25, 2022
@ix5 ix5 added this to the 0.13 milestone May 25, 2022
@ix5 ix5 force-pushed the api-endpoints-apidoc-docs branch from 053c213 to 124967e Compare May 25, 2022 04:06
@ix5 ix5 changed the title Api endpoints apidoc docs [server] API endpoint for /new changed, remove obsolete /count GET, apiDoc improvements May 25, 2022
@ix5 ix5 marked this pull request as draft May 25, 2022 12:14
ix5 added 9 commits May 27, 2022 00:45
apiDoc fails to parse a non-semantic version
All endpoints should now be properly documented using
`apidoc`. As such, remove duplication and point directly to
the needed sections.
Every endpoint should now have a full API documentation.
While at it, clean up some minor functionality
- `.get_json()` -> `.json` property
- Add better error message for when `latest-enabled` is
  well... not enabled
The REMOVEME has been in the code for quite a while and a
better substitute exists.
@ix5 ix5 force-pushed the api-endpoints-apidoc-docs branch from 124967e to fd1434f Compare May 26, 2022 22:46
@ix5 ix5 changed the title [server] API endpoint for /new changed, remove obsolete /count GET, apiDoc improvements [server] Remove obsolete /count GET, apiDoc improvements May 26, 2022
The GET endpoint was only intended for fetching counts for a
single thread and has been deprecated.
@ix5 ix5 marked this pull request as ready for review May 26, 2022 23:00
@ix5 ix5 merged commit ed7b16e into isso-comments:master May 26, 2022
@ix5 ix5 deleted the api-endpoints-apidoc-docs branch May 26, 2022 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docs Documentation of the project improvement Not a new feature, but makes Isso more pleasant to use server (Python) server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant