mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-20 23:41:42 +01:00
Add Bruno imports and a file-tree importer API (#706)
This commit is contained in:
1 parent
46464cfacf
commit
aa10c44a45
109 files changed
+4684
-879
No files matched your search
@@ -5,6 +5,7 @@ import type {
|
||||
HttpRequest,
|
||||
HttpRequestHeader,
|
||||
HttpUrlParameter,
|
||||
ImportSource,
|
||||
PartialImportResources,
|
||||
PluginDefinition,
|
||||
Workspace,
|
||||
@@ -46,8 +47,9 @@ export const plugin: PluginDefinition = {
|
||||
importer: {
|
||||
name: "OpenAPI",
|
||||
description: "Import OpenAPI collections",
|
||||
onImport(_ctx: Context, args: { text: string }) {
|
||||
return convertOpenApi(args.text);
|
||||
onImportSource(_ctx: Context, { source }: { source: ImportSource }) {
|
||||
if (source.type !== "text") return null;
|
||||
return convertOpenApi(source.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user