-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 Tool for generation catalog schema from OpenAPI definition file (#5734
- Loading branch information
Showing
7 changed files
with
31,453 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.7-slim | ||
|
||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip install git+https://github.com/airbytehq/[email protected] | ||
|
||
RUN mkdir -p /schemas | ||
|
||
WORKDIR /schemas | ||
|
||
ENTRYPOINT ["/usr/local/bin/openapi2jsonschema"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# openapi2jsonschema | ||
Util for generating catalog schema from OpenAPI definition file. Froked from [openapi2jsonschema](https://github.com/instrumenta/openapi2jsonschema) util with fixes for generating standlone schemas e.g. ones that don't contain reference to another files/resources. | ||
|
||
## Usage | ||
```bash | ||
$ tools/openapi2jsonschema/run.sh <path to OpenAPI definition file> | ||
``` | ||
It would generate set of jsonschema files based on components described on OpenAPI definition and place it on "**schemas**" fodler in current working directory. | ||
|
||
Support OpenAPI v2.0, v3.0 and v3.1. Works with both json and yaml OpenAPI formats. | ||
|
||
### Examples | ||
You can try to run this tool on sample OpenApi definition files located in [exmaples](./examples) directory. That is some OpenAPI files taken from APIs-guru repo [from github](https://github.com/APIs-guru). |
Oops, something went wrong.