# Error importing openapi json

**URL:** <https://community.postman.com/t/error-importing-openapi-json/77209>\
**Category:** Help Hub\
**Tags:** collections, json\
**Created:** [March 18, 2025, 11:04am UTC](https://community.postman.com/t/error-importing-openapi-json/77209 "2025-03-18T11:04:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faber08](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/faber08/32/31978_2.png) [@Faber08](https://community.postman.com/u/Faber08)\
**Post date:** [March 18, 2025, 11:04am UTC](https://community.postman.com/t/error-importing-openapi-json/77209/1 "2025-03-18T11:04:23Z")

</div>

Hi all,  
I saw several posts like this, but no resolving answer.  
I can’t import an open api json also using the .net scaffolding base API project without any personal impementation.  
The json result is

```auto
{
  "openapi": "3.0.1",
  "info": {
    "title": "WebApplication20 | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://localhost:7233"
    },
    {
      "url": "http://localhost:5213"
    }
  ],
  "paths": {
    "/weatherforecast": {
      "get": {
        "tags": [
          "WebApplication20"
        ],
        "operationId": "GetWeatherForecast",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WeatherForecast"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WeatherForecast": {
        "required": [
          "date",
          "temperatureC",
          "summary"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "temperatureC": {
            "type": "integer",
            "format": "int32"
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "temperatureF": {
            "type": "integer",
            "format": "int32"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "WebApplication20"
    }
  ]
}

```

I can import it only with copy/paste the JSON and not using the url [http://localhost](http://localhost)  
Same error with http

Postman notify me _Error while fetching data from link_

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/a/aa8d648b5cffe2786a82e2c568cedf6d81a6f20c.png)

Postman v11.36.6

Can someone help me to figure out the problem?

Thank you!

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 18, 2025, 11:42am UTC](https://community.postman.com/t/error-importing-openapi-json/77209/2 "2025-03-18T11:42:44Z")

</div>

Hey @Faber08 : 👋🏼

Welcome to the Postman Community :postman:

There was a similar question raised a couple of weeks ago that was passed on to the team. A GitHub issue was created to track this:

> <https://github.com/postmanlabs/postman-app-support/issues/13481>
>
> \### Is there an existing issue for this?
> 
> \- \[x\] I have searched the tracker for …existing similar issues and I know that duplicates will be closed
> 
> \### Describe the Issue
> 
> I'm using postman desktop app, 
> \`\`\`Postman for Mac
> Version
> 11.34.2
> UI version
> 11.34.2-ui-250225-1210
> 
> Desktop platform version
> 11.34.2
> 
> Architecture
> arm64
> 
> OS platform
> OS X 24.3.0
> \`\`\` 
> 
> When I try to import a collection from \`http://localhost:8000/openapi.json\` I got and error saying the collection couldn't be imported. 
> Checking on the postman's devs console I can see CORS errors related to it. 
> 
> 
> The main problem I'm seeing here is it seems to be forcing CORS policies, even though it is the desktop app, and as it is a developer tool (in my opinion) it shouldn't, or if you want to, give us a way to customize the header "Origin" to be set a custom value, instead to be fixed on \`https://desktop.postman.com\`. 
> 
> There are also, other similar reports like: https://community.postman.com/t/cors-error-while-importing-collection-from-swagger-worked-a-couple-of-weeks-ago/73712
>  
> 
> \### Steps To Reproduce
> 
> 1. Open postman desktop app
> 2. Go to "import" option
> 3. Past the url to be imported (it must be a localhost one)
> 4. You will see the error.
> 
> \### Screenshots or Videos
> 
> !\[Image\](https://github.com/user-attachments/assets/b1f3ca70-60ea-4c74-94ef-3b7aaef90e95)
> 
> and 
> 
> !\[Image\](https://github.com/user-attachments/assets/1f70a141-62a4-4f58-be4f-b123e82bdc2c)
> 
> 
> 
> \### Operating System
> 
> macOS
> 
> \### Postman Version
> 
> 11.34.2
> 
> \### Postman Platform
> 
> Postman App
> 
> \### User Account Type
> 
> Signed In User
> 
> \### Additional Context?
> 
> \_No response\_

Can you provide the information for your issue on there, please?

---

<div class="post-metadata">

**Author:** ![Faber08](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/faber08/32/31978_2.png) [@Faber08](https://community.postman.com/u/Faber08)\
**Post date:** [March 18, 2025, 11:55am UTC](https://community.postman.com/t/error-importing-openapi-json/77209/3 "2025-03-18T11:55:10Z")

</div>

Hi @danny-dainton,

thank you for your quick reply.  
Sure, I’m adding info to the GitHub Issue.
