incubator-kie-kogito-runtimes icon indicating copy to clipboard operation
incubator-kie-kogito-runtimes copied to clipboard

Included DMN model inputs are missing in the OAS InputSet (Quarkus)

Open andrey-dubnik opened this issue 2 years ago • 0 comments

Describe the bug

Hi,

We would like to include another DML model into the definition and re-use the inputs. This works but it seem OAS is not getting generated for the included model inputs, if we define new inputs directly in the model it works fine.

Expected behavior

If pricing.dmn produced this spec

            "required": [
                "Age",
                "Previous incidents?"
            ],
            "type": "object",
            "properties": {
                "Age": {
                    "type": "number",
                    "x-dmn-type": "FEEL:number"
                },
                "Previous incidents?": {
                    "type": "boolean",
                    "x-dmn-type": "FEEL:boolean"
                }
            },

corresponding simple.dmn would have following spec (if simple was the name the model was imported as) if we re-use Age and Previous incidents inputs

            "properties": {
                "Simple": {
                    "type": "object",
                    "required": [
                        "Age",
                        "Previous incidents?"
                    ],
                    "properties": {
                        "Age": {
                            "type": "number",
                            "x-dmn-type": "FEEL:number"
                        },
                        "Previous incidents?": {
                            "type": "boolean",
                            "x-dmn-type": "FEEL:boolean"
                        }
                    }
                }
            },

Actual behavior

There are no OAS DMN input specs generated for the included model inputs

How to Reproduce?

  1. create a simple.dmn in the same sample project with the pricing.dmn
  2. include the pricing.dmn into the simple.dmn
  3. drop few pricing inputs into the simple diagram
  4. start quarkus

After that I've started the quarkus and figured there is no DMN input attributes for the inputs we have used from the included model in OAS as dmnDefinitions.json does not have those.

"InputSetsimple": {
            "type": "object",
            "x-dmn-type": "DMNType{ ns2 : InputSetsimple }",
            "x-dmn-descriptions": {}
        },

Output of uname -a or ver

No response

Output of java -version

openjdk version "17.0.5" 2022-10-18

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

<quarkus.platform.version>2.14.0.Final</quarkus.platform.version>

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6

Additional information

No response

andrey-dubnik avatar Nov 11 '22 09:11 andrey-dubnik