Skip to content

Commit

Permalink
Add Insomnia Collection import capability (#30)
Browse files Browse the repository at this point in the history
* feat: Add import-insomnia-collection capability

* chore: move models into folders and namespaces
  • Loading branch information
frankkilcommins authored May 22, 2024
1 parent 5c47fd4 commit d0fdb6b
Show file tree
Hide file tree
Showing 17 changed files with 1,052 additions and 22 deletions.
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 @@ -209,6 +210,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

0 comments on commit d0fdb6b

Please sign in to comment.