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

Consistent IDs #400

Closed
jpoehnelt opened this issue Aug 20, 2021 · 9 comments
Closed

Consistent IDs #400

jpoehnelt opened this issue Aug 20, 2021 · 9 comments
Labels
importer improvement Issue is for improvement of existing flow.

Comments

@jpoehnelt
Copy link

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.

@VShingala
Copy link
Member

@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?

@jpoehnelt
Copy link
Author

jpoehnelt commented Aug 26, 2021

My current setup is:

  1. construct OpenAPI spec from many files
  2. convert to postman collection
  3. 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.

@jpoehnelt
Copy link
Author

jpoehnelt commented Aug 26, 2021

Here is my workaround doing a post processing of the conversion output. googlemaps/openapi-specification#189

@jpoehnelt
Copy link
Author

jpoehnelt commented Sep 9, 2021

Note the workaround did not work in the upload process (step 3 above). This is still desired.

@VShingala
Copy link
Member

VShingala commented Sep 13, 2021

@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.

@jpoehnelt
Copy link
Author

how should I update in that case?

@jpoehnelt
Copy link
Author

@VShingala Any updates here?

@VShingala
Copy link
Member

@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.

@VShingala VShingala added the improvement Issue is for improvement of existing flow. label Jan 13, 2023
@akshaydeo
Copy link

@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 🙇‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
importer improvement Issue is for improvement of existing flow.
Projects
None yet
Development

No branches or pull requests

3 participants