Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/swagger2 importer #695

Merged
merged 6 commits into from Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,026 changes: 0 additions & 1,026 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/insomnia-app/app/common/import.js
Expand Up @@ -76,7 +76,7 @@ export async function importRaw (
): Promise<{source: string, error: string | null, summary: {[string]: Array<BaseModel>}}> {
let results;
try {
results = convert(rawContent);
results = await convert(rawContent);
} catch (e) {
console.warn('Failed to import data', e);
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/insomnia-app/app/ui/components/wrapper.js
Expand Up @@ -199,7 +199,7 @@ class Wrapper extends React.PureComponent<Props, State> {
// Allow user to paste any import file into the url. If it results in
// only one item, it will overwrite the current request.
try {
const {data} = importers.convert(text);
const {data} = await importers.convert(text);
const {resources} = data;
const r = resources[0];

Expand Down