postmanlabs / swagger2-postman2

Module and library to convert Swagger 2.0 to a Postman Collection (v2.0)
Apache License 2.0
81 stars 42 forks source link

Body params descriptions are not used #39

Open schneivo77 opened 5 years ago

schneivo77 commented 5 years ago

Hi,

is it intentional that the descriptions of body parameters are not used in the Postman collection after the conversion?

From your README.md:

Body param conversion example

If in = body

swagger postman
name: role-id
description: role identifier number
in: body
schema: \<schemaObject>
"body": {
 "mode": "raw",
 "raw": json-schema-faker(\<schemaObject>)
}

If in = formData and consumes = application/x-www-form-urlencoded

swagger postman
name: role-id
description: role identifier number
in: formData
default: defaultValue
"body": {
 "mode": "urlencoded",
 "urlencoded": [{
  "key": "role-id",
  "value": defaultValue,
  "type": "text",
 }]
}

All parmas with above condition are added to urlencoded array.

If in = formData and consumes = multipart/form-data

swagger postman
name: role-id
description: role identifier number
in: formData
default: defaultValue
"body": {
 "mode": "formdata",
 "formdata": [{
  "key": "role-id",
  "value": defaultValue,
  "type": "text",
 }]
}

All parmas with above condition are added to formdata array.