Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "All API Documentation for 'Form my Family' Software."
- version: "1.0.0"
- title: "For my Family"
- host: "35.182.67.173:3000"
- basePath: "/api"
- tags:
- - name: "Authentication"
- description: "Operations about user's authentication"
- schemes:
- - "http"
- paths:
- /auth/signup:
- post:
- tags:
- - "Authentication"
- summary: "Create new user (form url encoded)"
- operationId: "createUser"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Created user object and returns an authentication token"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- default:
- description: "{ accessToken: string }"
- /auth/signin:
- post:
- tags:
- - "Authentication"
- summary: "Login authentication for user (form url encoded)"
- operationId: "userLogin"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Login User and returns an authentication token"
- required: true
- schema:
- type: object
- properties:
- usernameOrEmail:
- type: string
- password:
- type: string
- responses:
- 200:
- description: "{ accessToken: String, user: Object }"
- 400:
- description: "{ message: Invalid username or password }"
- /auth/logout:
- get:
- tags:
- - "Authentication"
- summary: "Logout the currently login account"
- description: ""
- operationId: "Login out the user"
- produces:
- - "application/json"
- parameters:
- - name: "token"
- in: "query"
- description: "current authorization token"
- required: true
- type: "string"
- responses:
- default:
- description: "successful operation"
- /users/password:
- post:
- tags:
- - "User"
- summary: " (form url encoded)"
- operationId: "userPasswordChange"
- produces:
- - "application/json"
- parameters:
- - name: "Authorization"
- in: "header"
- description: "Authorization Token"
- required: true
- type: "string"
- - in: "body"
- name: "body"
- description: "User password changes (token required)"
- required: true
- schema:
- type: object
- properties:
- currentPassword:
- type: string
- newPassword:
- type: string
- verifyPassword:
- type: string
- responses:
- 200:
- description: "{ message: Password changed successfully }"
- schema:
- type: "string"
- 422:
- description: "{ message: Current password is incorrect }, { message: Passwords do not match }"
- 500:
- description: "Invalid or expired Token"
- /auth/forgot:
- post:
- tags:
- - "Authentication"
- summary: " (form url encoded)"
- operationId: "passwordForgot"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "User password changes (token required)"
- required: true
- schema:
- type: object
- properties:
- email:
- type: string
- responses:
- 200:
- description: "{ message: An email has been sent to the provided email with further instructions. }"
- 400:
- description: "{ message: No account with that username or email has been found }"
- securityDefinitions:
- petstore_auth:
- type: "oauth2"
- authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
- flow: "implicit"
- scopes:
- write:pets: "modify pets in your account"
- read:pets: "read your pets"
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- User:
- type: "object"
- properties:
- firstName:
- type: "string"
- lastName:
- type: "string"
- email:
- type: "string"
- username:
- type: "string"
- password:
- type: "string"
- xml:
- name: "User"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement