Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
Lars-Kolsaker opened this issue Apr 24, 2024 · 0 comments
Open
1 task done

Comments

@Lars-Kolsaker
Copy link

Lars-Kolsaker commented Apr 24, 2024

Is there an existing issue for this?

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant