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

Add Insomnia Collection import capability #30

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/gitversion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 0.5
next-version: 0.6
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{InformationalVersion}'
Expand Down
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Simple utility CLI for importing data into SwaggerHub Explore.
>
> `import-spaces` Import SwaggerHub Explore spaces from a file
>
> `import-postman-collection` Import a Postman Collection (v2.1) from a file into SwaggerHub Explore

> `import-postman-collection` Import Postman Collection (v2.1) from a file into SwaggerHub Explore
>
> `import-insomnia-collection` Import Insomnia Collection (v4) from a file into SwaggerHub Explore

### Prerequisites
You will need the following:
Expand Down Expand Up @@ -177,6 +178,44 @@ From SwaggerHub Explore, navigate to your browser development tools, locate the
> - GraphQL collections/requests not supported
> - Environments, Authorization data (not including explicit headers), Pre-request Scripts, Tests are not included in import

### Running the `import-insomnia-collection` command

**Command Options**
```
_____ _ ____ _ _
| ____| __ __ _ __ | | ___ _ __ ___ / ___| | | (_)
| _| \ \/ / | '_ \ | | / _ \ | '__| / _ \ | | | | | |
| |___ > < | |_) | | | | (_) | | | | __/ _ | |___ | | | |
|_____| /_/\_\ | .__/ |_| \___/ |_| \___| (_) \____| |_| |_|
|_|
```
**Description:**
> Import Insomnia collections (v4) from a file

**Usage:**
> Explore.CLI import-insomnia-collection [options]

**Options:**
> `-ec`, `--explore-cookie` <explore-cookie> (REQUIRED) A valid and active SwaggerHub Explore session cookie

> `-fp`, `--file-path` <file-path> (REQUIRED) The path to the Insomnia collection

> `-v`, `--verbose` Include verbose output during processing

> `-?`, `-h`, `--help` Show help and usage information

**Note** - the format for SwaggerHub Explore cookies is as follows: `"cookie-name=cookie-value; cookie-name=cookie-value"`

>Example: `"SESSION=5a0a2e2f-97c6-4405-b72a-299fa8ce07c8; XSRF-TOKEN=3310cb20-2ec1-4655-b1e3-4ab76a2ac2c8"`

> **Notes:**
> - Compatible with Insomnia Collection Exports v4
> - GraphQL collections/requests not supported
> - gRPC collections/requests are not supported
> - Environments variables are inlined and set within the Explore Space
> - Authorization - only Basic and Bearer Token variants are supported


## More Information on SwaggerHub Explore

- For SwaggerHub Explore info, see - https://swagger.io/tools/swaggerhub-explore/
Expand Down
Loading
Loading