Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9410

No Model definition in KIE Server Swagger API.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.45.0.Final
    • 7.44.0.Final
    • KieServer
    • None

      There is a schema definition for endpoints which return primitive types
      e.g : 
      /server/admin/containers/{containerId}/cases/instances/{caseId}" :
       
      _

      {"schema" : \{ "type" : "string" }

      ,_
       
      swagger code generator will generate this endpoint method and will have String return type.
       
      But for few REST endpoints model(in UI)/schema(in swagger.json) is not defined:
       
      "/server/queries/tasks/instances/process/{processInstanceId}" : {
            "get" : {
              "tags" : [ "Process queries" ],
              "summary" : "Returns task instances associated with a specified process instance.",
              "description" : "",
              "operationId" : "getTasksByStatusByProcessInstanceId",
              "produces" : [ "application/json", "application/xml" ],
              "parameters" : [ {
                "name" : "processInstanceId",
                "in" : "path",
                "description" : "process instance id to filter task instances",
                "required" : true,
                "type" : "integer",
                "format" : "int64"
              }, {
                "name" : "status",
                "in" : "query",
                "description" : "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)",
                "required" : false,
                "type" : "array",
                "items" : {
                  "type" : "string",
                  "enum" : [ "Created", "Ready", "Reserved", "InProgress", "Suspended", "Completed", "Failed", "Error", "Exited", "Obsolete" ]
                },
                "collectionFormat" : "multi"
              }, {
                "name" : "page",
                "in" : "query",
                "description" : "optional pagination - at which page to start, defaults to 0 (meaning first)",
                "required" : false,
                "type" : "integer",
                "default" : 0,
                "format" : "int32"
              }, {
                "name" : "pageSize",
                "in" : "query",
                "description" : "optional pagination - size of the result, defaults to 10",
                "required" : false,
                "type" : "integer",
                "default" : 10,
                "format" : "int32"
              }, {
                "name" : "sort",
                "in" : "query",
                "description" : "optional sort column, no default",
                "required" : false,
                "type" : "string"
              }, {
                "name" : "sortOrder",
                "in" : "query",
                "description" : "optional sort direction (asc, desc) - defaults to asc",
                "required" : false,
                "type" : "boolean",
                "default" : true
              } ],
              "responses" : {
                "200" : {
                  "description" : "Successfull response",
                  "examples" : {
                    _"application/json" : "{\n  \"task-summary\": [\n    

      {\n      \"task-id\": \"2\",\n      \"task-name\": \"Self Evaluation\",\n      \"task-subject\": \"\",\n      \"task-description\": \"Please perform a self-evalutation.\",\n      \"task-status\": \"Ready\",\n      \"task-priority\": \"0\",\n      \"task-is-skippable\": \"false\",\n      \"task-created-by\": \"John\",\n      \"task-created-on\": \"2016-04-05T15:09:14.206+02:00\",\n      \"task-activation-time\": \"2016-04-05T15:09:14.206+02:00\",\n      \"task-proc-inst-id\": \"2\",\n      \"task-proc-def-id\": \"evaluation\",\n      \"task-container-id\": \"myContainer\",\n      \"task-parent-id\": \"-1\"\n    }

      ,\n    {\n      \"task-id\": \"1\",\n      \"task-name\": \"Self Evaluation\",\n      \"task-subject\": \"\",\n      \"task-description\": \"Please perform a self-evalutation.\",\n      \"task-status\": \"InProgress\",\n      \"task-priority\": \"0\",\n      \"task-is-skippable\": \"false\",\n      \"task-actual-owner\": \"kiesu\",\n      \"task-created-by\": \"John\",\n      \"task-created-on\": \"2016-04-05T15:05:06.508+02:00\",\n      \"task-activation-time\": \"2016-04-05T15:05:06.508+02:00\",\n      \"task-proc-inst-id\": \"1\",\n      \"task-proc-def-id\": \"evaluation\",\n      \"task-container-id\": \"myContainer\",\n      \"task-parent-id\": \"-1\"\n    }\n  ]\n}"_
                  }
                },
                "500" : {
                  "description" : "Unexpected error"
                }
              }
            }
          },
       
      For endpoints that do not have the schema, there will be a void return type in client code.

              ftirados Francisco Javier Tirado Sarti
              ftirados Francisco Javier Tirado Sarti
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: