Import source unsupported
A refusal to import mocks, because the source is not a HAR file, a Postman v2.0 or v2.1 collection or curl commands, though it may be a valid file of another kind.
| Field | Value |
|---|---|
type |
https://mockhub.dev/problems/import-unsupported |
| Status | 422 |
What it means
Section titled “What it means”The import recognised what the source is, and it is not something it reads. Nothing was created. detected names what it found, and the detail says where to import it instead.
Status
Section titled “Status”Always 422.
Where it comes from
Section titled “Where it comes from”From previewing or applying an import.
detected |
The source | detail |
|---|---|---|
openapi |
An OpenAPI or Swagger document | This is an OpenAPI document. Import it from the project's OpenAPI tab. |
postman-v1 |
A Postman v1 collection | This is a Postman v1 collection. Export the collection as v2.1. |
postman-environment |
A Postman environment | This is a Postman environment. Import the collection, and give its variables under options.variables. |
insomnia |
An Insomnia export | This is an Insomnia export. Export it as HAR. |
powershell |
PowerShell’s Invoke-WebRequest |
This is PowerShell, not curl. Copy the request as cURL (bash), or export the session as HAR. |
unknown |
Anything else | This is not a HAR, a Postman v2 collection or a curl command. |
For an OpenAPI document, the app links to Import it on the OpenAPI tab. For a Postman environment, options.variables is Variables (optional) in the app.
detected is one of the values above.
{ "type": "https://mockhub.dev/problems/import-unsupported", "title": "Import format not supported", "status": 422, "detail": "This is a Postman v1 collection. Export the collection as v2.1.", "detected": "postman-v1"}What to do
Section titled “What to do”- An OpenAPI document: import it from the project’s OpenAPI tab; see Import an OpenAPI specification.
- A Postman v1 collection: export it again from Postman as Collection v2.1.
- A Postman environment: import the collection, and enter the environment’s values under Variables (optional).
- An Insomnia export: export the requests as HAR.
- PowerShell: copy the request from the browser as cURL (bash), or export the session as HAR.