Advertisement
Guest User

Untitled

a guest
Mar 15th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "All API Documentation for 'Form my Family' Software."
  4. version: "1.0.0"
  5. title: "For my Family"
  6. host: "35.182.67.173:3000"
  7. basePath: "/api"
  8. tags:
  9. - name: "Authentication"
  10. description: "Operations about user's authentication"
  11. schemes:
  12. - "http"
  13. paths:
  14. /auth/signup:
  15. post:
  16. tags:
  17. - "Authentication"
  18. summary: "Create new user (form url encoded)"
  19. operationId: "createUser"
  20. produces:
  21. - "application/json"
  22. parameters:
  23. - in: "body"
  24. name: "body"
  25. description: "Created user object and returns an authentication token"
  26. required: true
  27. schema:
  28. $ref: "#/definitions/User"
  29. responses:
  30. default:
  31. description: "{ accessToken: string }"
  32. /auth/signin:
  33. post:
  34. tags:
  35. - "Authentication"
  36. summary: "Login authentication for user (form url encoded)"
  37. operationId: "userLogin"
  38. produces:
  39. - "application/json"
  40. parameters:
  41. - in: "body"
  42. name: "body"
  43. description: "Login User and returns an authentication token"
  44. required: true
  45. schema:
  46. type: object
  47. properties:
  48. usernameOrEmail:
  49. type: string
  50. password:
  51. type: string
  52. responses:
  53. 200:
  54. description: "{ accessToken: String, user: Object }"
  55. 400:
  56. description: "{ message: Invalid username or password }"
  57.  
  58. /auth/logout:
  59. get:
  60. tags:
  61. - "Authentication"
  62. summary: "Logout the currently login account"
  63. description: ""
  64. operationId: "Login out the user"
  65. produces:
  66. - "application/json"
  67. parameters:
  68. - name: "token"
  69. in: "query"
  70. description: "current authorization token"
  71. required: true
  72. type: "string"
  73. responses:
  74. default:
  75. description: "successful operation"
  76. /users/password:
  77. post:
  78. tags:
  79. - "User"
  80. summary: " (form url encoded)"
  81. operationId: "userPasswordChange"
  82. produces:
  83. - "application/json"
  84. parameters:
  85. - name: "Authorization"
  86. in: "header"
  87. description: "Authorization Token"
  88. required: true
  89. type: "string"
  90. - in: "body"
  91. name: "body"
  92. description: "User password changes (token required)"
  93. required: true
  94. schema:
  95. type: object
  96. properties:
  97. currentPassword:
  98. type: string
  99. newPassword:
  100. type: string
  101. verifyPassword:
  102. type: string
  103. responses:
  104. 200:
  105. description: "{ message: Password changed successfully }"
  106. schema:
  107. type: "string"
  108. 422:
  109. description: "{ message: Current password is incorrect }, { message: Passwords do not match }"
  110. 500:
  111. description: "Invalid or expired Token"
  112. /auth/forgot:
  113. post:
  114. tags:
  115. - "Authentication"
  116. summary: " (form url encoded)"
  117. operationId: "passwordForgot"
  118. produces:
  119. - "application/json"
  120. parameters:
  121. - in: "body"
  122. name: "body"
  123. description: "User password changes (token required)"
  124. required: true
  125. schema:
  126. type: object
  127. properties:
  128. email:
  129. type: string
  130. responses:
  131. 200:
  132. description: "{ message: An email has been sent to the provided email with further instructions. }"
  133. 400:
  134. description: "{ message: No account with that username or email has been found }"
  135. securityDefinitions:
  136. petstore_auth:
  137. type: "oauth2"
  138. authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
  139. flow: "implicit"
  140. scopes:
  141. write:pets: "modify pets in your account"
  142. read:pets: "read your pets"
  143. api_key:
  144. type: "apiKey"
  145. name: "api_key"
  146. in: "header"
  147. definitions:
  148. User:
  149. type: "object"
  150. properties:
  151. firstName:
  152. type: "string"
  153. lastName:
  154. type: "string"
  155. email:
  156. type: "string"
  157. username:
  158. type: "string"
  159. password:
  160. type: "string"
  161. xml:
  162. name: "User"
  163. ApiResponse:
  164. type: "object"
  165. properties:
  166. code:
  167. type: "integer"
  168. format: "int32"
  169. type:
  170. type: "string"
  171. message:
  172. type: "string"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement