-
Notifications
You must be signed in to change notification settings - Fork 6
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
A route DSL sugar middleware for noflow #10
Comments
I prefer to apply the DSL as illustrated below: // acquire an instance of verbalizer
var I = verbalizer();
// GET /getUserInfo
// method getUserInfo can injected within global scope
I.get.an.instance.of('UserInfo').by.method('getUserInfo')
.with.arguments.schema('SchemaUser')
.when.arguments.error('status 400').with.comment('input argument invalid') The syntax of the verbalizer can be discussed later |
A good point to start. |
So what's your plan to implement it? |
I’ll take several days to weave the syntax tree and to determinate words category. Besides, words for different purpose usage can be gathered into different categories, which you could reckon them as normal English grammatical categories something like conjunction or predicate. And what matters most will be the customization of the injection and error handling. The essentiality of the Verbalizer is to promote user with straightforward syntax-bound words to documentize their logic behavior. |
Additionally, Verbalizer should stick to express or other middle-ware based frameworks as well. What do u think? @ysmood |
For now, I don't have any better idea than yours. Looking forward to your code. |
Such as
@magnus-
The text was updated successfully, but these errors were encountered: