openapi-to-postman
openapi-to-postman copied to clipboard
Consistent IDs
It would be beneficial to use consistent ids for the items in the collection instead of UUID. For example this would enable linking to a specific request. OpenAPI already supports operationId
.
@jpoehnelt Good suggestion! One thing I would like to ask though is, IDs are not persisted with import in Postman App. Meaning if you were to import this collection on postman app these IDs are not same (issue) So, can I know your use case with collections with id
as operationId
?
My current setup is:
- construct OpenAPI spec from many files
- convert to postman collection
- use Postman API to patch collection in workspace
Step 3 ends up with a ton of noise in the Postman changelog, e.g. https://www.postman.com/google-maps-platform/workspace/047c6f75-6b23-42df-b77a-70d716895d9f/collection/13440387-fc4788d5-77f9-4639-a4c5-74a2878d7eb5?ctx=changelog, which I am assuming is due to changing ids.
Here is my workaround doing a post processing of the conversion output. https://github.com/googlemaps/openapi-specification/pull/189
Note the workaround did not work in the upload process (step 3 above). This is still desired.
@jpoehnelt Here for step 3 - Patch collection, are you using this endpoint? If yes, here patching will overwrite entire collection. Meaning entire collection will be replaced and here even if we try to patch same collection with previous IDs, it will contain many changes.
how should I update in that case?
@VShingala Any updates here?
@jpoehnelt For mentioned Update endpoint, there should be no problem with updating the collection generated from this module. (I tried it myself and did not see any issue, the collection was updated with all changes)
However, as I understand, the main issue you have right now is that IDs present in collection changes which result in additional changes (some changes replaces ID which are not necessary). Unfortunately, atm, as this module simply uses postman-collection to generate collection, IDs are generated by postman-collection
APIs.
Although with all id
fields or without id
fields there should be no problem with updating collection via mentioned endpoint.
Do let me know if I am missing anything here.
@jpoehnelt update
endpoint should fix step 3 in your workflow. I am closing this ticket for now but feel free to reopen it if you are still blocked 🙇♂