Conversation
| request_params(_) -> | ||
| error(unknown_operation). | ||
|
|
||
| -spec request_param_info(OperationID :: atom(), Name :: atom()) -> #{ |
There was a problem hiding this comment.
Не проще ли на этом уровне ввести типы operation_id, parameter и т.д., да ещё возможно и экспортнуть их.
95ac7fe to
adb641b
Compare
adb641b to
a48143c
Compare
| get_api_key(header, KeyParam, Req0) -> | ||
| {Headers, Req} = cowboy_req:headers(Req0), | ||
| {swagger_utils:get_opt({{packageName}}_utils:to_header(KeyParam), Headers), Req}; | ||
| {Headers, Req} = cowboy_req:headers(Req0), |
|
В остальном, |
| -spec validate_response( | ||
| OperationID :: operation_id(), | ||
| Code :: integer(), | ||
| Code :: non_neg_integer(), |
|
|
galaxie
added a commit
that referenced
this pull request
Jan 20, 2017
* Initial erlang generation * Recfactor erlang codegen to make a minimal working example * ft/erlang_codegen Separate handlers by resourse, add minor codegen fixes and refactoring * Test commit * ft/erlang_codegen Modify reouting generation * ft/erlang_codegen Remove parsed request concept. Add minor refactoring and bugfixes * ft/erlang_codegen Use swagger spec from an internal directory instead of a provided path * ft/erlang_codegen Add basic response validation * ft/erlang_codegen Moved all the req validators to a separate file for test needs * ft/erlang_codegen Add basic param validation * Add refactoring: OperationIDs are atoms now Fix schema validation Add todo list * CAPI-23 Add auth context to request handling (#2) * CAPI-23 Fix routing to support different paths in one handler. Add auth context to request handling. Add an opportunity to pass custom middlewares to the server * CAPI-31 Add enum validation and some minor fixes (#4) * CAPI-31 Fix turbo fuck up with additional params (#5) * Capi 23/fix/basic logging (#6) * CAPI-23 Add understandable messages in case of bad requests. Add specs to shut up dialyzer and add some minor code refactoring * CAPI-23 Fix missed bracket in auth module (#7)
galaxie
added a commit
that referenced
this pull request
Jan 20, 2017
* CAPI-23 Add understandable messages in case of bad requests. Add specs to shut up dialyzer and add some minor code refactoring
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Добавлено какое-никакое логирование и спеки.