openapi: 3.0.0
info:
  title: Messages
  version: 1.0.0
  description: 'Messages API'
  contact:
    name: Eric McGregor
servers:
- url: https://localhost:3001
  description: Local development server
tags:
- name: User
paths:
  /user:
    post:
      summary: Create New User
      description: Create New User
      operationId: postUser
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
            example:
              firstName: Joe
              age: 25
              isAdmin: false
              scores:
                - 100
                - 98
                - 100
                - 96
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  firstName:
                    type: string
                  age:
                    type: integer
                  isAdmin:
                    type: boolean
                  scores:
                    type: array
                    items:
                      type: integer
                  _id:
                    type: string
        '500':
          description: Error creating user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    User:
      type: object
      required:
        - firstName
        - age
        - isAdmin
      properties:
        firstName:
          type: string
        age:
          type: integer
        isAdmin:
          type: boolean
        scores:
          type: array
          items:
            type: integer
    InternalServerError:
      type: object
      properties:
        message:
          type: string
    