ToolJet/frontend/src/Editor/QueryManager/QueryEditors/index.js
Muhsin Shah C P dcee0885d6
Feature: OpenApi import plugin (#2728)
* 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
2022-04-26 14:14:12 +05:30

21 lines
569 B
JavaScript

import React from 'react';
import DynamicForm from '@/_components/DynamicForm';
import { allOperations } from '@tooljet/plugins/client';
import { Restapi } from './Restapi';
import { Runjs } from './Runjs';
import { Stripe } from './Stripe';
import { Openapi } from './Openapi';
export const allSources = {
...Object.keys(allOperations).reduce((accumulator, currentValue) => {
accumulator[currentValue] = (props) => <DynamicForm schema={allOperations[currentValue]} {...props} />;
return accumulator;
}, {}),
Restapi,
Runjs,
Stripe,
Openapi,
};