Search in sources :

Example 1 with DMNEvaluator

use of org.kie.kogito.jitexecutor.dmn.DMNEvaluator in project kogito-apps by kiegroup.

the class SchemaResource method schema.

@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response schema(MultipleResourcesPayload payload) {
    DMNEvaluator dmnEvaluator = DMNEvaluator.fromMultiple(payload);
    DMNModel dmnModel = dmnEvaluator.getDmnModel();
    DMNOASResult oasResult = DMNOASGeneratorFactory.generator(dmnEvaluator.getAllDMNModels()).build();
    return fullSchema(dmnModel, oasResult, false);
}
Also used : DMNOASResult(org.kie.dmn.openapi.model.DMNOASResult) DMNEvaluator(org.kie.kogito.jitexecutor.dmn.DMNEvaluator) DMNModel(org.kie.dmn.api.core.DMNModel) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces)

Example 2 with DMNEvaluator

use of org.kie.kogito.jitexecutor.dmn.DMNEvaluator in project kogito-apps by kiegroup.

the class SchemaResource method form.

@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("form")
public Response form(MultipleResourcesPayload payload) {
    DMNEvaluator dmnEvaluator = DMNEvaluator.fromMultiple(payload);
    DMNModel dmnModel = dmnEvaluator.getDmnModel();
    DMNOASResult oasResult = DMNOASGeneratorFactory.generator(dmnEvaluator.getAllDMNModels()).build();
    return formSchema(dmnModel, oasResult);
}
Also used : DMNOASResult(org.kie.dmn.openapi.model.DMNOASResult) DMNEvaluator(org.kie.kogito.jitexecutor.dmn.DMNEvaluator) DMNModel(org.kie.dmn.api.core.DMNModel) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces)

Aggregations

Consumes (javax.ws.rs.Consumes)2 POST (javax.ws.rs.POST)2 Produces (javax.ws.rs.Produces)2 DMNModel (org.kie.dmn.api.core.DMNModel)2 DMNOASResult (org.kie.dmn.openapi.model.DMNOASResult)2 DMNEvaluator (org.kie.kogito.jitexecutor.dmn.DMNEvaluator)2 Path (javax.ws.rs.Path)1