openapi: 3.0.3
info:
  title: APR6
  version: "1.0"
servers:
  - url: 'https://apr6.apiengine.online'
paths:
  /createcase:
    put:
      requestBody:
        content:
          application/json: {}
      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                message:
                  type: string
                case:
                  type: integer
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sys1-proposition:
    put:
      requestBody:
        content:
          application/json:
            schema:
              type: object
            properties:
              case:
                type: integer
              proposition:
                type: string
              essence:
                type: string
              appearance:
                type: string
              level:
                type: integer
            required:
              - case
              - proposition
      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                message:
                  type: string
                info:
                  type: list
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sys2-proposition:
    put:
      requestBody:
        content:
          application/json:
            schema:
              type: object
            properties:
              case:
                type: integer
              proposition:
                type: string
              essence:
                type: string
              appearance:
                type: string
              level:
                type: integer
            required:
              - case
              - proposition

      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                message:
                  type: string
                info:
                  type: list
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sys2-realistic:
    put:
      requestBody:
        content:
          application/json:
            schema:
                type: object
            properties:
              case:
                type: integer
            required:
              - case
      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                case:
                  type: integer
                decision:
                  type: string
                judgments:
                  type: list
                info:
                  type: string
              required:
                - case
                - decision
                - judgments
                - info 
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                  type: object
              properties:
                case:
                  type: integer
              required:
              - case
  /traincase:
    put:
      requestBody:
        content:
          application/json:
            schema:
                type: object
            properties:
              case:
                type: integer
            required:
              - case
      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                message:
                  type: string
                info:
                  type: list 
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /retract_that:
    put:
      requestBody:
        content:
          application/json:
            schema:
                type: object
            properties:
              case:
                type: integer
            required:
              - case
      responses:
        '200':
          description: OK
          content:
            application/json: 
              schema:
                type: object
              properties:
                message:
                  type: string
                info:
                  type: list 
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:     
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      name: api-key
      in: header
security:
  - APIKeyAuth: []
