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

Improve API docs #299

Open
ozgrakkurt opened this issue Dec 6, 2021 · 1 comment
Open

Improve API docs #299

ozgrakkurt opened this issue Dec 6, 2021 · 1 comment

Comments

@ozgrakkurt
Copy link
Contributor

It might make things more organized if we create something like Open API spec for this so It is more streamlined.

Something like Open API might be too much but we might still be able to imrove API docs. There are no indication of when there will be an error returned for some endpoints for example.

@pedromtcosta
Copy link
Collaborator

Nice idea creating this issue!
Personally I also think we could (should?) refactor a bit so the API docs make more sense:

  • define which endpoints are actually in use. Maybe @vsubhuman can help with that;
  • refactor the way the handlers are registered in the router: currently we register everything at index.ts, but some routes have handlers coming from index itself, and some are coming from dedicated files;
  • change the endpoints to not simply throw on errors, but rather return proper error codes depending on what went wrong;
  • normalize the endpoints. Some are v2, some aren't and it's not clear if what is not v2 is deprecated;

I was thinking of creating a /v0/ for the API and moving everything that is still in use there.

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

No branches or pull requests

2 participants