SPIKE: Vert.x OpenAPI support PoC

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Adam Dickmeiss April 26, 2021 at 12:34 PM

PoC completed with two API generators.

Adam Dickmeiss April 16, 2021 at 1:36 PM
Edited

PoC here: https://github.com/folio-org/mod-eusage-reports
 

Reusing the work of this module.. But it's a PoC for OpenAPI with that Vert.x library.
 
I took Tenant API v2 and converted it - manually - to OpenAPI.

https://github.com/folio-org/mod-eusage-reports/tree/master/src/main/resources/openapi

What surprised me the most is that OpenAPI does not support JSON schemas - at least not in the form we have it in RAML. So they'd have to be tweaked somehow.  I had hoped we could reuse them as they were .. But there's just no free ride. One problem goes away and new problems arise. 
 
Properties like id and $schema are not recognized. 

https://swagger.io/docs/specification/data-models/keywords/

Note that the problem with JSON schemas is fixed in 3.1 of OpenAPI. But most tools still only support 3.0!

API wise.. 

Using the Vert.x OpenAPI API for RMB would be a quite different approach. For this reason, I'll also look at

https://openapi-generator.tech/

 
This is also used in folio-spring-base.

 

 

David Crossley January 7, 2021 at 2:11 AM

Regarding the linked ticket https://folio-org.atlassian.net/browse/FOLIO-2793#icft=FOLIO-2793 for "translation". At this stage i have only done basic investigation. Not yet sure if those tools are ready.

David Crossley January 7, 2021 at 2:11 AM

If it helps, then there is a new "validation" facility for FOLIO CI. It does both OpenAPI OAS and RAML.
https://dev.folio.org/guides/api-lint/

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Core: Platform

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 6, 2021 at 4:07 PM
Updated April 26, 2021 at 12:34 PM
Resolved April 26, 2021 at 12:34 PM
TestRail: Cases
TestRail: Runs

Flag notifications