The Apicurio Data Models library is a Java and TypeScript compatible library that provides reading, writing, analysis, modification, and validation of OpenAPI and AsyncAPI documents. Use this library if you need to support either OpenAPI or AsyncAPI specifications in your own projects.
The Apicurio Data Models library is written in Java and then transpiled to TypeScript using the very nice JSweet Utility. This results in the library being released both as a standard Maven library and released into Maven Central, as well as a JavaScript module released into npmjs.com.
The JSweet tool does a great job with the transpilation, allowing us to have a very thin compatibility layer to isolate functionality that cannot be transpiled from Java to TypeScript. In addition, we have a very comprehensive set of unit tests that are designed to run in both the Java and TypeScript builds. This is critical because it enables us to be very confident that the library behaves the same in both runtime environments.
The motivation for writing this library in this way is because the Apicurio Studio project requires this data modeling functionality in both the Java back-end layer and the browser front-end layer. As a result, this library is heavily used in both forms and is not just a novelty.