we are following this pega instrcution Pegasystems Documentation to integrate REST API using OpenAPI Specification.
It workes fine if the yaml has a simply structure. Unfortunately the data object could not be generated with complex yaml. For example,
@LiL95470 This is a GenAI-powered tool. All generated answers require validation against the provided references.
After researching this issue, I can confirm that while OpenAPI Specification supports array data types, there are indeed some known limitations when handling more complex nested array structures. The OpenAPI framework generally works well with simple structures as you mentioned, but can encounter difficulties with more complex hierarchical data models.
Based on my research, here are a few potential approaches you might consider:
Simplify the Array Structure: If possible, consider restructuring your YAML to flatten some of the nested arrays. Sometimes breaking complex objects into simpler components can help with generation.
Custom Data Mapping: Instead of relying on the automatic generation, you might need to implement a custom mapping approach where you manually define how the complex arrays should be structured in your Pega application.
Use Intermediate Transformations: Consider implementing a data transform that converts the complex structure into something more manageable after the API call.
Check YAML Validation: Ensure your YAML is properly formatted and doesn’t contain any syntax issues that might be causing problems with the array object generation.
Consider OpenAPI Version: If you’re not already, try using OpenAPI Specification 3.x, as it has better support for complex data structures compared to earlier versions.
It would be helpful to know if you’ve already tried any of these approaches or if there are specific error messages you’re receiving when attempting to generate the data model. This would help narrow down the exact issue.
If these suggestions don’t resolve the issue, I would recommend opening a case with Pega Support as this might be a limitation with how Pega currently handles complex array structures in OpenAPI Specifications. They would be able to provide you with an official solution or workaround specific to your implementation.