[nodejs] Re: how to Auto-generate models in nodejs

2018-03-01 Thread Zlatko
As an alternative to ejs, you might be able to use something like Swagger 
and one of it's plugins.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/52fad3ca-b236-476e-a92f-f47d96ec48cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: how to Auto-generate models in nodejs

2018-03-01 Thread vijay kumar
Hi,

I dint find any template concept for nodej.js

On Tuesday, 27 February 2018 21:41:07 UTC+5:30, vijay kumar wrote:
>
> Hi ,
>
>  I want to auto generate models in node.js based on the API spec file 
> .Like model should contain setter method which we can use while passing the 
> data to API .
>
> Example of what i am looking at.How can i generate something like this as 
> shown below.Any help is appreciated.
>
> data: {
> "name": "String",
> "description": "String",
> "externalId": "String",
> "type": "String", 
> "members": "String"
> }
>
>
> i want model to be generated with method like 
>
>
> setName(name) {
> data.name = name;
> }
>
> setDescription(description) {
>   data.description = description;
> }
>
> setExternalId(externalId) {
>data.externalId = externalId;
> }
>
> setType(type) {
> data.type = type;
> }
>
>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/bdcb4bf9-2438-42ac-b6f9-5090ca1ef4b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: how to Auto-generate models in nodejs

2018-02-28 Thread Yaroslav Gaponov
Hi

Just use any template engine like ejs 



вторник, 27 февраля 2018 г., 17:11:07 UTC+1 пользователь vijay kumar 
написал:
>
> Hi ,
>
>  I want to auto generate models in node.js based on the API spec file 
> .Like model should contain setter method which we can use while passing the 
> data to API .
>
> Example of what i am looking at.How can i generate something like this as 
> shown below.Any help is appreciated.
>
> data: {
> "name": "String",
> "description": "String",
> "externalId": "String",
> "type": "String", 
> "members": "String"
> }
>
>
> i want model to be generated with method like 
>
>
> setName(name) {
> data.name = name;
> }
>
> setDescription(description) {
>   data.description = description;
> }
>
> setExternalId(externalId) {
>data.externalId = externalId;
> }
>
> setType(type) {
> data.type = type;
> }
>
>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/f800c73d-726f-42ab-be29-e6a0a1257dae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.