postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Using the https://api.getpostman.com/import/openapi returns paramMissingError

Open Lars-Kolsaker opened this issue 1 year ago • 0 comments
trafficstars

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

Hi We have Azure Devops pipeline that export OpenAPi definition from APIM and want to use the output to be imported into a Postman workspace using https://api.getpostman.com/import/openapi. In the pipeline we have powershell that build up the request. The body and headers looks ok, but still we get this error

{"error":{"name":"paramMissingError","message":"The request body is missing a value for the type parameter. Check your request and try again.","details":{"param":"type"}}}

As far as we can see the request contains the type property. This is the request that is sent

`POST https://api.getpostman.com/import/openapi?workspace=**************************** HTTP/1.1 Host: api.getpostman.com Content-Type: multipart/form-data; boundary="f9941155-322e-4f11-9a2b-e0aa9ad14aa5" X-API-Key: *********************************************************************** Content-Length: 2093

--f9941155-322e-4f11-9a2b-e0aa9ad14aa5 Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=type

string --f9941155-322e-4f11-9a2b-e0aa9ad14aa5 Content-Disposition: form-data; name=input; filename=swagger.json; filename*=utf-8''swagger.json

{ "openapi": "3.0.1", "info": { "title": "Listener Avonova Digital API", "description": "", "version": "1.0" }, "servers": [ { "url": "https://apim-***********" } ], "paths": { "/location/{id}": { "delete": { "summary": "Delete location", "description": "Delete Avonova Digital location", "operationId": "delete-location", "parameters": [ { "name": "id", "in": "path", "description": "ID of the location to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "" } } }, "put": { "summary": "Update location", "description": "Update Avonova Digital location", "operationId": "update-location", "parameters": [ { "name": "id", "in": "path", "description": "ID of the location to update", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "" } } } }, }, "components": { "securitySchemes": { "apiKeyHeader": { "type": "apiKey", "name": "Adp-Listener-AvoDig-Api-Subscription-Key", "in": "header" }, "apiKeyQuery": { "type": "apiKey", "name": "Adp-Listener-AvoDig-Api-Subscription-Key", "in": "query" } } }, "security": [ { "apiKeyHeader": [ ] }, { "apiKeyQuery": [ ] } ] } --f9941155-322e-4f11-9a2b-e0aa9ad14aa5-- `

Steps To Reproduce

n/a

Screenshots or Videos

No response

Operating System

Windows

Postman Version

10.24.22 - Desktop app version

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

Lars-Kolsaker avatar Apr 24 '24 11:04 Lars-Kolsaker