-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the event-type CRUD to more strictly enforce Schema type (#668)
The current event-type CRUD is too permissive with the `schema` field. It accepts any json (such as `1`, "foobar", etc.), but it should only accept json objects (such as `{"foo":"bar"}`). This PR updates the event-type CRUD groups. In addition, I wanted to support calling `json_wrapper!` outside of types.rs. `types.rs` is already quite large, and I think it makes a bit more sense for types (such as `eventtype::Schema`) to be colocated with other types they interact with. Finally, I updated the error logging to add trace information for 4xxs. This wasn't strictly necessary, but it made diagnosing the source of 4xxs when testing locally much easier.
- Loading branch information
Showing
6 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters