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

Builtin endpoints do not follow CRUD #86

Closed
Tracked by #96
jonathanhliu21 opened this issue Dec 27, 2021 · 2 comments · Fixed by #96
Closed
Tracked by #96

Builtin endpoints do not follow CRUD #86

jonathanhliu21 opened this issue Dec 27, 2021 · 2 comments · Fixed by #96
Labels
priority Issues that have priority
Milestone

Comments

@jonathanhliu21
Copy link
Owner

jonathanhliu21 commented Dec 27, 2021

get() and receive() and other endpoints which get data from serial port should only be accessible via GET requests, and sending data should be accessible via POST requests.

Additionally, the names/terms of some RestApiHandler methods, such as add_endpoint(), are wrong, because it is actually adding a resource. Endpoints are different for different request methods. The method/decorator should be called something like add_conn_resource() instead.

@jonathanhliu21 jonathanhliu21 added this to the 0.2b0 milestone Dec 27, 2021
@jonathanhliu21 jonathanhliu21 added priority Issues that have priority breaking A breaking change labels Dec 27, 2021
This was referenced Dec 31, 2021
@jonathanhliu21 jonathanhliu21 removed the priority Issues that have priority label Dec 31, 2021
@jonathanhliu21 jonathanhliu21 mentioned this issue Jan 1, 2022
28 tasks
@jonathanhliu21
Copy link
Owner Author

jonathanhliu21 commented Jan 2, 2022

This isn't breaking change because we can create an alias for the add_endpoint() method but rename it to something else. Additionally, there is API versioning.

@jonathanhliu21 jonathanhliu21 linked a pull request Jan 2, 2022 that will close this issue
28 tasks
@jonathanhliu21
Copy link
Owner Author

jonathanhliu21 commented Jan 2, 2022

I will fix the second part of this issue later because there are too many places where "route", "endpoint", and "resource" are used interchangeably. This includes the documentation, comments in the code, variable names, method names, parameter names, etc.

@jonathanhliu21 jonathanhliu21 added priority Issues that have priority and removed breaking A breaking change labels Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Issues that have priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant