Parsing API workflows.
The OpenAPI Workflow parser is an open-source Java library designed to parse the OAI Arazzo specification files. It reads an Arazzo file (JSON or YAML formats are supported) and creates the corresponding Java objects.
The parser's goal is to simplify the extraction and manipulation of workflows, helping developers create applications and tools that harness the semantic structure of API flows.
- Workflow Parsing: Reads OAI Arazzo specification files loading the corresponding Java objects.
- Ease of Use: Provides a simple way for developers to parse workflows.
- Compatibility: Supports both JSON and YAML formats.
- Validation: Validates the specification according to the Arazzo Specification v1.0.0.
You can include this library from Maven central:
<dependency>
<groupId>com-api-flows</groupId>
<artifactId>openapi-workflow-parser</artifactId>
<version>0.0.3</version>
</dependency>
Parse from file:
final String WORKFLOWS_SPEC = "path/pet-coupons.workflow.yaml";
OpenAPIWorkflowParserResult result = parser.parse(WORKFLOWS_SPEC);
boolean valid = result.isValid();
String title = result.getOpenAPIWorkflow().getInfo().getTitle();
Parse from URL:
final String WORKFLOWS_SPEC = "https://host/path/pet-coupons.workflow.yaml";
OpenAPIWorkflowParserResult result = parser.parse(WORKFLOWS_SPEC);
boolean valid = result.isValid();
String title = result.getOpenAPIWorkflow().getInfo().getTitle();
Clone from the GitHub repository
git clone https://github.com/API-Flows/openapi-workflow-parser.git
cd openapi-workflow-parser
mvn package
Add the Maven repository for the OpenAPI workflow parser snapshots:
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/API-Flows/openapi-workflow-parser</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
Add the SNAPSHOT dependency (check latest available) in your POM file:
<dependency>
<groupId>com.api-flows</groupId>
<artifactId>openapi-workflow-parser</artifactId>
<version>0.0.4-SNAPSHOT</version>
</dependency>