{
  "openapi": "3.0.1",
  "info": {
    "title": "unknown",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": ".",
      "variables": {}
    }
  ],
  "paths": {
    "/Hello2": {
      "post": {
        "summary": "String Hello2(IRulesRuntimeContext)",
        "description": "Rules method: java.lang.String Hello2()",
        "operationId": "Hello2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "text/plain;charset=UTF-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Successful operation"
          },
          "400": {
            "description": "Invalid request format e.g. missing required field, unparseable JSON value, etc.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JAXRSErrorResponse"
                },
                "example": {
                  "message": "Cannot parse 'bar' to JSON",
                  "type": "BAD_REQUEST"
                }
              }
            }
          },
          "422": {
            "description": "Custom user errors in rules or validation errors in input parameters",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JAXRSUserErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/JAXRSErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "Example 1": {
                    "description": "Example 1",
                    "value": {
                      "message": "Some message",
                      "type": "USER_ERROR"
                    }
                  },
                  "Example 2": {
                    "description": "Example 2",
                    "value": {
                      "message": "Some message",
                      "code": "code.example",
                      "type": "USER_ERROR"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server errors e.g. compilation or parsing errors, runtime exceptions, etc.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JAXRSErrorResponse"
                },
                "example": {
                  "message": "Failed to load lazy method.",
                  "type": "COMPILATION"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JAXRSUserErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "USER_ERROR",
              "RULES_RUNTIME",
              "COMPILATION",
              "SYSTEM",
              "BAD_REQUEST",
              "VALIDATION"
            ]
          }
        }
      },
      "JAXRSErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "USER_ERROR",
              "RULES_RUNTIME",
              "COMPILATION",
              "SYSTEM",
              "BAD_REQUEST",
              "VALIDATION"
            ]
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}