Skip to main content

Hello everyone, 

 

We’re currently working on generating an OpenAPI 3.0 specification from Salesforce.

The generation works as expected, but when we try to import the resulting spec into a downstream platform, we receive the following error: 

 

Import failed 

Please adjust your OpenAPI specification and try again.

Reason: Invalid Request Body

  • Schema cannot contain any allOf, oneOf, or $ref
  • Must have required property "$ref"
  • Must not have additional properties
  • Must match exactly one schema in oneOf, etc.

 

The problem appears to stem from Salesforce's use of allOf, oneOf, and discriminator-based schemas, which are not supported in our integration target. For our use case, we need fully flattened schemas with all properties explicitly defined — no $ref, no inheritance or polymorphism.

 

Has anyone faced a similar challenge? Is there a recommended way to either configure the Salesforce OpenAPI generator to avoid these constructs or post-process the output into a flat schema format? 

 

Any guidance, tools, or sample scripts would be greatly appreciated.

Thanks in advance! 

 

Best regards, 

 

Claudia

0/9000