-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create sumo_entities_handler #3
Conversation
@@ -16,7 +16,6 @@ | |||
{elvis_style, nesting_level, #{level => 3}}, | |||
{elvis_style, god_modules, #{limit => 35}}, | |||
{elvis_style, no_if_expression}, | |||
{elvis_style, invalid_dynamic_call}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't adding the exception for the specific module be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all modules (at least those with actual code, i.e. not just behaviour definitions) in this repo will use dynamic calls… it's kinda the point here :)
-spec encode_date(calendar:datetime()) -> binary(). | ||
encode_date(DateTime) -> iso8601:format(DateTime). | ||
|
||
-spec decode_date(binary()) -> calendar:datetime(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Dialyzer:
Invalid type specification for function sr_json:decode_date/1. The success typing is (nonempty_string()) -> {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}}
…_handler Create sumo_entities_handler
It has to be built on trails and it has to provide the following endpoints:
GET /[entities]
- return all entitiesPOST /[entities]
- creates a new entity