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

Add schemas to device api routes #2357

Merged
merged 11 commits into from
Jun 29, 2023

Conversation

knolleary
Copy link
Member

Part of #1556

This targets the branch of #2356

This PR adds schemas to routes/api/device.js

Along the way I found one route that had a test looking for the built-in required params validation error message. However, for reasons, having applied the schema the response format is different and doesn't provide the useful error message about what has failed.

As it stands, I haven't been setting the required flag on any schema consistently - some already had it. We'll want to do a second pass through and tidy that up - including getting the error response object to contain useful information in a useful structure.

https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/#error-handling covers a lot of it.

Add schemas to admin/settings/stack routes
Add schemas to Template, Types and UserInvitation routes
Add schemas to all teamDevices routes
@knolleary knolleary merged commit 6221466 into 1556-replace-project-routes Jun 29, 2023
3 checks passed
@knolleary knolleary deleted the 1556-device-routes branch June 29, 2023 15:01
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.

None yet

2 participants