-
Bug
-
Resolution: Done
-
Major
-
1.24.0.Final
-
False
-
None
-
False
-
Added workflow ID as a prefix for OpenAPI input schemas
-
---
-
---
-
2022 Week 32-34 (from Aug 8), 2022 Week 38-40 (from Sept 19), 2022 Week 41-43 (from Oct 10)
When a workflow definition has a dataInputSchema attribute defined, the resulting OpenAPI generated by the quarkus workflow application will include a schema reference to the workflow input like this one:
components: schemas: workflowdata: required: - SSN - term - amount type: object properties: amount: type: integer term: type: integer SSN: pattern: "^\\d{3}-\\d{2}-\\d{4}$" type: string
The problem is that if we have more than one workflow definition in the same project, the resulting OpenAPI file will fail since the schema name (workflowdata) is the same.
This name should have a prefix associated with the ModelInput. For example, in this case we have:
LoanbrokerModelInput: type: object properties: workflowdata: allOf: - $ref: '#/components/schemas/JsonNode' - $ref: '#/components/schemas/workflowdata'
The property has the correct naming, but the schema should be loanbroker_workflowdata (loanbroker is the workflow ID). This way, it won't conflict with another input schema in the same project.
One more thing, the "JsonNode" schema shouldn't be referenced in the model schema if the file has a dataInputSchema.
- depends on
-
KOGITO-7956 Remove workflowdata from generated swagger documentation
- Resolved
- is related to
-
KOGITO-7675 Missing workflowdata element in openapi file of serverless workflow
- Resolved
-
KOGITO-7624 Kogito Serverless Workflows create dangling process instance if fail to validate the input schema
- Resolved
- relates to
-
KOGITO-7848 Remove workflowdata variable from serverless workflow
- Resolved