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

New API server for v5 #60

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

LostLuma
Copy link
Member

@LostLuma LostLuma commented Nov 13, 2024

Description

In addition to the API surface receiving a small overhaul here's some highlights:

  • Add option to add more paste scanners through the config instead of code
  • Add pastes with a set amount of maximum views (backend for [Feature Request] Expire after reading N times. #51)
  • Annotations are now arrays of objects instead of a string field and decoupled positions
  • Fix private paste view counts updating when being requested with the wrong password

These things are not done yet, but I will get to them in the next few days hopefully:

  • Invalidating found secrets
  • Rate limits
  • Documentation (not sure how that'll work)
  • Some type of translation layer to give people time to migrate

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have updated the changelog with a quick recap of my changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
  • I have read and agree to the Developer Certificate of Origin for this contribution

@AbstractUmbra
Copy link
Collaborator

For the documentation we could look into OpenAPI specs and hosting this via SwaggerUI?

I already started working on something like this here and it can be hosted via SwaggerIO or Redoc (or both) for common and decent API documentation.

There's also the system the existing one uses called Scalar, however looking at the Rust example I'm not too sure how we could integrate that, but perhaps this is something you could look into if you would like.

Scalar looks the nicest, but OpenAPI/Swagger/Redoc are common and good too!

@LostLuma
Copy link
Member Author

Thanks for the info, I ended up using the same system the existing API uses, it seemed pretty nice to me.

Note: The image is not pushed anywhere yet,
that'll hopefully be done by our local CD witch later.

Signed-off-by: Lilly Rose Berner <[email protected]>
Signed-off-by: Lilly Rose Berner <[email protected]>
Signed-off-by: Lilly Rose Berner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Expire after N hours/days [Feature Request] Expire after reading N times.
2 participants