From 06e8a84893547a5601752230b8f148ede0df8bff Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 22 Jul 2024 14:39:45 -0400 Subject: [PATCH] import an OpenAPI spec --- docs/insomnia/get-started/documents/spec.md | 77 ++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/docs/insomnia/get-started/documents/spec.md b/docs/insomnia/get-started/documents/spec.md index 544f2bf..4d584bf 100644 --- a/docs/insomnia/get-started/documents/spec.md +++ b/docs/insomnia/get-started/documents/spec.md @@ -2,5 +2,80 @@ layout: article-detail title: Import an OpenAPI Spec --- +Insomnia supports importing and exporting. Currently, the supported import formats are: - \ No newline at end of file +* Insomnia +* [Postman v2](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html) +* HTTP Archive (HAR) +* OpenAPI 3.0 and 3.1 +* Swagger +* Web Services Description Language (WDSL) +* cURL + + + + +## Resources and Resource Types + +### Resource IDs + +Resource IDs are used to map to data in an active workspace. They look like variables within the export file. Some example special resource IDs are: + +{:.table .table-striped} +Resource ID | Description +----------- | ----------- +`__WORKSPACE_ID__` | Maps to the ID of the currently active workspace +`__BASE_ENVIRONMENT_ID__` | Maps to the ID of the active workspace base environment +`_____` | Any value matching this format will deterministically generate a new ID at import time + +### Resource Types + +We offer a variety of resource types. Resource types outline what is included and excluded from an export file. Some responses and metadata models aren't exported. + +See all resource types listed under [data.resources](https://github.com/Kong/insomnia/blob/7abde2a01700f587179941b3231fb1078fcb1e41/packages/insomnia-app/app/common/export.ts#L185-L198). + +### Importers Package and Contribution + +The [Insomnia Importers Package](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src/utils/importers) supports migrating older export versions to the latest version, and external formats like HAR, Postman, Swagger/OpenAPI, and cURL. If you want to contribute new formats, submit a pull request to [insomnia-importers](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src/utils/importers) on GitHub. \ No newline at end of file