Skip to content

Commit

Permalink
add parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred J. Kwak committed Feb 17, 2017
1 parent 1f44104 commit 0f0e2ff
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion generators/app/templates/server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ Api.addRoute('<%= p %>', {}, {<% for (var e in api.paths[p]) { %>
<%= e %>: {
swagger: {
tags: ['<%= api.paths[p][e].tags %>'],
description: '<%= api.paths[p][e].description %>',
description: '<%= api.paths[p][e].description %>',<% if(api.paths[p][e].parameters) { %>
parameters: [<% for (var param in api.paths[p][e].parameters) { %>
{
name: '<%= api.paths[p][e].parameters[param].name %>',
in: '<%= api.paths[p][e].parameters[param].in %>',
description: '<%= api.paths[p][e].parameters[param].description %>',
required: <%= api.paths[p][e].parameters[param].required %>,
type: '<%= api.paths[p][e].parameters[param].type %>',
},<% } %>
],<% } %>
responses: {<% for (var r in api.paths[p][e].responses) { %>
<%= r %>: {
description: '<%= api.paths[p][e].responses[r].description %>',
Expand Down

0 comments on commit 0f0e2ff

Please # to comment.