Skip to content

Commit 337afa4

Browse files
authored
Update README.md
1 parent e3c3d8b commit 337afa4

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

README.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,61 @@
1-
# openapi-workflow-parser
2-
Java parser of the OpenAPI workflow specification
1+
# OpenAPI Workflow Parser
32

3+
![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)
44
[![](https://badgen.net/github/license/api-flows/openapi-workflow-parser)](LICENSE)
5-
[![](https://badgen.net/maven/v/maven-central/com.apiflows/openapi-workflow-parser)](https://repo1.maven.org/maven2/com/apiflows/openapi-workflow-parser/)
5+
[![](https://badgen.net/maven/v/maven-central/com.api-flows/openapi-workflow-parser)](https://repo1.maven.org/maven2/com/api-flows/openapi-workflow-parser/)
6+
7+
Java parser of the [OpenAPI SIG-Workflows specification](https://github.com/OAI/sig-workflows).
8+
9+
## Overview
10+
11+
The OpenAPI Workflow parser is an open-source Java library designed to parse the OpenAPI SIG-Workflows specification files. It reads an OpenAPI workflow specifications file (either JSON or YAML formats are supported) and creates the corresponding Java objects.
12+
The goal of the parser is to simplifiy the extraction and manipulation of OpenAPI workflows, helping developers in creating applications and tools that leverage the semantic of API flows.
13+
14+
## Features
15+
16+
- **Workflow Parsing:** Reads OpenAPI specification files loading the corresponding Java objects.
17+
- **Ease of Use:** Provides a user-friendly way for developers to parse OpenAPI workflows.
18+
- **Compatibility:** Supports OpenAPI specifications in JSON and YAML formats.
19+
- **Validation:** Validates the OpenAPI specification according to the [Workflows Specification v1.0.0](https://github.com/OAI/sig-workflows/blob/main/versions/1.0.0.md).
20+
21+
## Usage
22+
23+
### Add to the project
24+
25+
You can include this library from Maven central:
26+
```
27+
<dependency>
28+
<groupId>com-api-flows</groupId>
29+
<artifactId>openapi-workflow-parser</artifactId>
30+
<version>0.0.1</version>
31+
</dependency>
32+
```
33+
34+
Parse from file:
35+
```java
36+
final String WORKFLOWS_SPEC = "path/pet-coupons.workflow.yaml";
37+
38+
OpenAPIWorkflowParserResult result = parser.parse(WORKFLOWS_SPEC);
39+
40+
boolean valid = result.isValid();
41+
String title = result.getOpenAPIWorkflow().getInfo().getTitle();
42+
```
43+
44+
Parse from URL:
45+
```java
46+
final String WORKFLOWS_SPEC = "https://host/path/pet-coupons.workflow.yaml";
47+
48+
OpenAPIWorkflowParserResult result = parser.parse(WORKFLOWS_SPEC);
49+
50+
boolean valid = result.isValid();
51+
String title = result.getOpenAPIWorkflow().getInfo().getTitle();
52+
```
53+
54+
## Build from source
55+
56+
Clone from the GitHub repository
57+
58+
```bash
59+
git clone https://github.com/gcatanese/openapi-workflow-parser.git
60+
```
661

0 commit comments

Comments
 (0)