Skip to content

Commit

Permalink
Clean swagger spec in example
Browse files Browse the repository at this point in the history
  • Loading branch information
chdanielmueller committed Jun 9, 2015
1 parent 4c0a6e0 commit d6fa533
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
54 changes: 27 additions & 27 deletions example/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@ module.exports.setup = function(app) {


/**
* @swagger
* /:
* get:
* description: Returns Hello World!
* responses:
* 200:
* description: hello world
* @swagger
* /:
* get:
* description: Returns the homepage
* responses:
* 200:
* description: hello world
*/
app.get('/', rootHandler);


/**
* @swagger
* /login:
* post:
* description: Login to the application
* produces:
* - application/json
* parameters:
* - name: username
* description: Username to use for login.
* in: formData
* required: true
* type: string
* - name: password
* description: User's password.
* in: formData
* required: true
* type: string
* responses:
* 200:
* description: login
* @swagger
* /login:
* post:
* description: Login to the application
* produces:
* - application/json
* parameters:
* - name: username
* description: Username to use for login.
* in: formData
* required: true
* type: string
* - name: password
* description: User's password.
* in: formData
* required: true
* type: string
* responses:
* 200:
* description: login
*/
app.post('/login', loginHandler);
};
2 changes: 1 addition & 1 deletion test/swagger-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"paths": {
"/": {
"get": {
"description": "Returns Hello World!",
"description": "Returns the homepage",
"responses": {
"200": {
"description": "hello world"
Expand Down

0 comments on commit d6fa533

Please sign in to comment.