joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
575 stars 99 forks source link

Feature request: ability to use description for default value #195

Closed EloB closed 1 year ago

EloB commented 2 years ago

I would like the same functionality like required where you can set it through description. My suggestion is to support all these: [required] [default="foobar"] [required] [default="foobar"] [default=1337]

Example:

paths:
  /hello
    parameters:
     - name: world
       in: query
       required: true
       schema:
         type: string
         default: "foobar"
joolfe commented 2 years ago

Hi @EloB,

An interesting feature, but there are some rules that should take into consideration, for example as specified in describing-parameters required and default doesn´t make sense, and there are also lot of considerations in terms of the type of the default that should match with the parameter type and so on... so is not as easy as seems as a first glance, but interesting aproach.

Best regards.

joolfe commented 1 year ago

Closed due to inactivity