openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/SWF_CREATE_SWITCH:
    post:
      tags:
      - SWF1
      operationId: /rfc/SWF_CREATE_SWITCH
      requestBody:
        content:
          application/json:
            schema:
              properties:
                STEP_CONDITIONS:
                  type: array
                  items:
                    type: object
                    properties:
                      DESCRIPT:
                        type: string
                        maxLength: 80
                        description: Name of Step or Outcome
                      ORDER:
                        type: integer
                        format: int64
                        description: 'WF: Status Number (for Conditions for Switch)'
                      CONDITION:
                        type: array
                        items:
                          type: object
                          properties:
                            PARSE_TYP:
                              type: string
                              maxLength: 1
                              description: 'Condition Editor: Type of Line in Internal Display'
                            LINE_ID:
                              type: integer
                              format: int64
                              description: 'Condition Editor: Line Number in Internal Display'
                            LINE_TYP:
                              type: string
                              maxLength: 1
                              description: 'Condition Editor: Type of Line in Internal Display'
                            LEFTEXPR:
                              type: string
                              maxLength: 255
                              description: Relational expression
                            LEFTEXPTY:
                              type: string
                              maxLength: 1
                              description: Workflow expression type
                            RIGHTEXPR:
                              type: string
                              maxLength: 255
                              description: Relational expression
                            RIGHTEXPTY:
                              type: string
                              maxLength: 1
                              description: Workflow expression type
                            COMPOP:
                              type: string
                              maxLength: 2
                              description: Relational operator for condition and until loop
                            LOGOP:
                              type: string
                              maxLength: 3
                              description: Logical Operator for Boolean Conditions
                            NOTFLAG:
                              type: string
                              maxLength: 1
                              description: Negation Flag for Condition Evaluation ('NOT')
                STEP_DESCRIPTION:
                  type: object
                  properties:
                    DESCRIPT:
                      type: string
                      maxLength: 80
                      description: Name of Step or Outcome
                    OTHER_DESC:
                      type: string
                      maxLength: 80
                      description: Name of Step or Outcome
                STEP_NODE_ID:
                  type: integer
                  format: int64
                STEP_PROPERTIES:
                  type: array
                  items:
                    type: object
                    properties:
                      NAME:
                        type: string
                        description: 'Attribute: Name'
                      VALUE:
                        type: string
                        description: 'Attributes: Value'
                      XVALUE:
                        type: string
                        format: byte
                        description: 'Attributes: Value'
              required:
              - STEP_DESCRIPTION
              - STEP_NODE_ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  NEW_BLOCK_ID:
                    type: integer
                    format: int64
                    description: Node Number
                  NEW_STEP_NODE_ID:
                    type: integer
                    format: int64
                  RESULT:
                    type: array
                    items:
                      type: object
                      properties:
                        ORDER:
                          type: integer
                          format: int64
                          description: 'WF: Status Number (for Conditions for Switch)'
                        NODEID:
                          type: integer
                          format: int64
                          description: Node Number
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
