-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(swagger): Setup API Documentation using swagger (#13)
- add swagger-jsdoc and swagger-ui-express packages - add swagger json file for the documentation - host to heroku for documentation test [Finishes #166789866]
- Loading branch information
Showing
7 changed files
with
109 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Authors Haven Documentation API", | ||
"version": "1.0.0", | ||
"description": "Authors Haven Documentation with Swagger" | ||
}, | ||
"host": "ah-lobos-backend-swagger.herokuapp.com", | ||
"basePath": "/", | ||
"tags": [ | ||
{ | ||
"name": "users", | ||
"description": "Create new User" | ||
} | ||
], | ||
"schemes": ["http", "https"], | ||
"consumes": ["application/json"], | ||
"produces": ["application/json"], | ||
"definitions": { | ||
"signup": { | ||
"required": [ | ||
"username", | ||
"email", | ||
"password" | ||
], | ||
"properties": { | ||
"username": { | ||
"type": "string" | ||
}, | ||
"email": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/api/users": { | ||
"post": { | ||
"tags": ["users"], | ||
"description": "Create new User", | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"description": "User create a new account", | ||
"require": true, | ||
"schema": { | ||
"$ref": "#/definitions/signup" | ||
} | ||
} | ||
], | ||
"produces": ["application/json"], | ||
"responses": { | ||
"201": { | ||
"description": "User Account created successfully", | ||
"schema": { | ||
"$ref": "#/definitions/signup" | ||
} | ||
}, | ||
"409": { | ||
"description": "User Account was not created" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |