tags:
- name: users
  description: users API

paths:
# [GET] users
  /users:
    get:
      tags:
      - users
      summary: Find All Users
      responses:
        200:
          description: 'OK'
        500:
          description: 'Server Error'

# [POST] users
    post:
      tags:
      - users
      summary: Add User
      parameters:
      - name: body
        in: body
        description: user Data
        required: true
        schema:
          $ref: '#/definitions/users'
      responses:
        201:
          description: 'Created'
        400:
          description: 'Bad Request'
        409:
          description: 'Conflict'
        500:
          description: 'Server Error'

# [GET] users/id
  /users/{id}:
    get:
      tags:
      - users
      summary: Find User By Id
      parameters:
      - name: id
        in: path
        description: User Id
        required: true
        type: integer
      responses:
        200:
          description: 'OK'
        409:
          description: 'Conflict'
        500:
          description: 'Server Error'

# [PUT] users/id
    put:
      tags:
      - users
      summary: Update User By Id
      parameters:
      - name: id
        in: path
        description: user Id
        required: true
        type: integer
      - name: body
        in: body
        description: user Data
        required: true
        schema:
          $ref: '#/definitions/users'
      responses:
        200:
          description: 'OK'
        400:
          description: 'Bad Request'
        409:
          description: 'Conflict'
        500:
          description: 'Server Error'

# [DELETE] users/id
    delete:
      tags:
      - users
      summary: Delete User By Id
      parameters:
      - name: id
        in: path
        description: user Id
        required: true
        type: integer
      responses:
        200:
          description: 'OK'
        409:
          description: 'Conflict'
        500:
          description: 'Server Error'

# definitions
definitions:
  users:
    type: object
    required:
        - email
        - password
    properties:
      email:
        type: string
        description: user Email
      password:
        type: string
        description: user Password

schemes:
 - https
 - http
