Skip to content
Discussion options

You must be logged in to vote

Portman uses the openapi-to-postman package to handle the conversion from OpenAPI to Postman.
One of the side effects the package has, is that it when there is OpenAPI property with type array, the generated data will have 2 elements which is valid according to the schema. See postmanlabs/openapi-to-postman#410 for more details.

So there are a number of options to overcome this behaviour:

1. Define a maxItems for your array

If you'd like to define a custom number of elements in the generated array, you can mention the minItems and maxItems fields according to your requirements. i.e. following will generate only one element in the array.

      requestBody:
        content:
          applic…

Replies: 2 comments

Comment options

thim81
Mar 22, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by thim81
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants