Expand my Community achievements bar.

SOLVED

Swagger v3 YAML format support

Avatar

Level 2

The latest Swagger v3 has YAML format.   Does AEM support Swagger definition in YAML format or it has to convert to JSON in order for AEM to parse?  Tried with petstore.yaml with that latest SP 14 and the create data source UI hang. 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@LYUAN only v2 is supported, I tested pet store on my local it worked fine, send me your YAML(inbox the link)

View solution in original post

9 Replies

Avatar

Employee Advisor

@LYUAN 

AEM forms currently support swagger 2.0 but recall a discussion around including support for 3.0 in future releases.

I will check and get back to you with a response to your questions on the YAML format as well.

Avatar

Employee Advisor

you can use YAML format, does not have to be in JSON

yes  AEM Forms supports OpenAPI Specification version 2.0 (fka Swagger).

Avatar

Level 2

We've tried with petstore.yaml with SP 14 and it hang and cannot finish during cloud data source creation.  The error log showing AEM is trying to parse it as JSON via Google JSON parser and failed with null pointer errors.   It would be great if the success steps in SP 14 can be shared.   Thanks a lot.

Avatar

Correct answer by
Employee Advisor

@LYUAN only v2 is supported, I tested pet store on my local it worked fine, send me your YAML(inbox the link)

Avatar

Level 2

@Mayank_Gandhi, thank you for confirming that only v2 supported.   Tested v2 YAML and JSON and both work.  https://petstore3.swagger.io/api/v3/openapi.yaml was the URL tested and failed, which is the V3 version.  This explains why it didn't work.  Looking forward to see AEM supporting v3 API in the future.

Avatar

Employee Advisor

@LYUAN you may raise a feature request for the same. 

 

Happy to help!

Avatar

Employee Advisor

@Mayank_Gandhi @LYUAN 

A feature pack request to support V3 is already logged and will be supported in future releases.