Skip to content

Repository files navigation

oas-overlay-java

Java library for processing OpenAPI Overlay documents

Usage

The OverlayProcessor class provides a method processOverlay which takes the OpenAPI document as a String and the Overlay document as a String and returns a String of the OpenAPI document with the updates applied.

Example:

publicclassOverlayExample {
privatestaticStringopenAPI = """openapi: 3.1.0info: title: Example API version: 1.0.0paths: /example: get: responses: '200': description: A simple example response content: application/json: schema: type: object properties: message: type: string """privatestaticStringoverlay = """overlay: 1.0.0info: title: Overlay to update the description version: 1.0.0actions:- target: $.info update: description: >- A description about the API for the user to understand what is going on. """publicstaticvoidmain(Stringarg[]) {
System.out.println(OverlayProcessor.processOverlay(openAPI, overlay));
}
}

About

Java library for processing OpenAPI Overlay documents

Resources

Security policy

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages