[
https://issues.redhat.com/browse/DROOLS-5944?page=com.atlassian.jira.plug...
]
Matteo Mortari commented on DROOLS-5944:
----------------------------------------
The role of this is to increase case coverage, and the test demonstrate no further code
change is required while producing JSON schema/openapi descriptors.
Later, the JSON schema for the DMN I/O is used to produce swagger/OAS descriptors for the
whole REST api doc.
Such definition is valid as no error is produced in swagger UI, example:
!screenshot-1.png|thumbnail!
Also please notice the Swagger/OAS as a whole is Valid.
For example can be reproduced by Validating against:
{code}
{
"openapi": "3.0.3",
"info": {
"title": "Generated API",
"version": "1.0"
},
"paths": {
"/undefinedIO": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/xml": {
"schema": {
"type": "string"
}
}
}
}
}
},
"post": {
"requestBody": {
"description": "DMN input",
"content": {
"application/json": {
"schema": {
"x-dmn-type": "FEEL:Any"
}
}
}
},
"responses": {
"default": {
"description": "DMN output",
"content": {
"application/json": {
"schema": {
"x-dmn-type": "FEEL:Any"
}
}
}
}
}
}
}
}
}
{code}
as in:
!screenshot-2.png|thumbnail!
Validated OK as:
!screenshot-3.png|thumbnail!
{code}
curl -X POST "https://validator.swagger.io/validator/" -H "accept:
image/png" -H "Content-Type: application/yaml" -d
"{\"openapi\":\"3.0.3\",\"info\":{\"title\":\"Generated
API\",\"version\":\"1.0\"},\"paths\":{\"/undefinedIO\":{\"get\":{\"responses\":{\"200\":{\"description\":\"OK\",\"content\":{\"application/xml\":{\"schema\":{\"type\":\"string\"}}}}}},\"post\":{\"requestBody\":{\"description\":\"DMN
input\",\"content\":{\"application/json\":{\"schema\":{\"x-dmn-type\":\"FEEL:Any\"}}}},\"responses\":{\"default\":{\"description\":\"DMN
output\",\"content\":{\"application/json\":{\"schema\":{\"x-dmn-type\":\"FEEL:Any\"}}}}}}}}}"
{code}
When later used in "OpenAPI UI Forms" is the underlying React form library does
NOT support the input field:
!screenshot-4.png|thumbnail!
Being a generic undefined object, but this is a limitation of the React form library which
cannot reconciliate which type of Form Input to be used for this field, understandably.
But not a problem from a Validation of the Swagger/OAS definition.
DMN OAS investigate InputData with undefined typeRef
----------------------------------------------------
Key: DROOLS-5944
URL:
https://issues.redhat.com/browse/DROOLS-5944
Project: Drools
Issue Type: Task
Components: dmn engine
Reporter: Matteo Mortari
Assignee: Matteo Mortari
Priority: Major
Attachments: screenshot-1.png, screenshot-2.png, screenshot-3.png,
screenshot-4.png
--
This message was sent by Atlassian Jira
(v8.13.1#813001)