Skip to content

Commit

Permalink
Feature: OpenApi import plugin (ToolJet#2728)
Browse files Browse the repository at this point in the history
* Initialized OpenApi plugin

* Added definition field to manifest file

* Added an openapi parser

* Implemented JSON/YAML resolver
- Removed swagger parser lib
- Added a field for choosing definition format type
- Implemented a resolver for resolving $ref

* Implemented a basic operations drop down from spec paths

* Added params and body ui

* Now, can view general parameters and servers

* Added an option to override general params
- Resolved a bug

* Implemented basic openapi plugin
- Added got lib
- Tested basic queries

* Added one more method

* Resolved a common bug

* Working on Parsing definition from datasource modal
- Created new form component for openapi
- Populated select array from security array

* Added ui for authentication

* Added bearer & basic plugin code

* Resolved some ui issues of Apikeys auth option

* Added apikey auth

* Resolved an issue
- Also replaced validate btn with auto validation
- Now spec will be added to db from data-source modal

* Added error text to show validation error

* Now spec will load from props for query manager

* Added some padding to operation description

* Added ui for openapi oauth2 auth

* Implemented oauth2

* Fixed a state issue with a temporary hack

* Now we can show multiple same auth types

* added the icon

* Resolved a bug & improved multiple apikeys process

* Resolved some realtime parsing error

* Resolved a bug from options fn

* Resolved PR changes

* Updated documentation with brief details about the open API plugin

* Removed unwanted package

* Changed if-else to switch

* Code changes

* added setLoadingSpec fn to catch section

* Solved typos and error in doc

* Resolved dropdown issue

* Resolved a bug

* updated openapi icon
  • Loading branch information
shah21 authored Apr 26, 2022
1 parent ace64c9 commit dcee088
Show file tree
Hide file tree
Showing 25 changed files with 2,302 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docs/docs/data-sources/openapi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# openapi

ToolJet has a data source for generating REST API operations from OpenAPI Specs.

## Connection
- Connections are generated from OpenAPI specifications. Currently supports Basic Auth, API Key, Bearer Token, OAuth 2.0

- Also supports specifications with multiple authentications

[Read more](https://swagger.io/docs/specification/authentication/)

## Querying OpenAPI
- Operations will be generated from specifications and each one will be different from other

### Common fields
- Host (Base URL)

Some specs can have one or more base URLs/servers and specific operations may have separate Base URLs. So you can select the URL from the host select

- Operation
2 changes: 2 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@
"jsx"
]
}
}
}
Loading

0 comments on commit dcee088

Please sign in to comment.