mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-11 10:50:35 -05:00
Request: Postman collection? #376
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kmanwar89 on GitHub (May 26, 2025).
Hi,
Is it possible to have a Postman collection shared for the API? I tried importing the Integration API's Swagger page into Postman, but it said the format was not recognized or supported, though I don't quite understand why since the API is using a compliant standard (OAP 3.0), which Postman should be able to import.
Thanks!
@miloschwartz commented on GitHub (May 27, 2025):
Hey, this would be good to have ootb. We used https://github.com/asteasolutions/zod-to-openapi which auto generated OpenAPI spec docs. I'd imagine they must be compliant otherwise Swagger UI wouldn't render it?
@kmanwar89 commented on GitHub (May 28, 2025):
Your guess is as good as mine :) I'm not entirely certain why Postman isn't importing it. I'll keep playing around, because I feel like I've seen a way to "export" the Swagger rendering into the raw format.
That said, can you point me to where the Open API XML or JSON for Pangolin might be? I'm assuming that's the starting point to try and figure out what is going on - perhaps that zod-to-openapi conversion isn't working as expected? I'll run it through some (locally hosted) LLM's to see if I can devise a solution...
@miloschwartz commented on GitHub (May 28, 2025):
@kmanwar89 It's a little funky, but since zod-to-openapi generates everything at runtime the JSON is in memory and not stored in a file. You'd need to add a line to the code to either print the JSON to logs so you can copy or save to a file once the container starts. You can see how this currently works at the bottom of this file: https://github.com/fosrl/pangolin/blob/main/server/integrationApiServer.ts
@kmanwar89 commented on GitHub (May 28, 2025):
Thanks @miloschwartz - I'm not much of a developer so it's not clear to me how I'd modify the linked file. Am I understanding correctly that it would entail modifying the code and then re-packaging Pangolin as a local-installed app? I'm using Docker w/ a compose file, so I guess that would mean doing local changes and then re-packaging my own Dockerfile to build a new image?
In lieu of that, is this something you would mind building in a test branch and test Docker image that I could then test against?
@miloschwartz commented on GitHub (Jun 4, 2025):
Hey, forgot we have a version of the yaml in the docs repo: https://github.com/fosrl/docs/blob/main/packages/docusaurus/openapi.yml
@kmanwar89 commented on GitHub (Jun 4, 2025):
Thanks @miloschwartz - postman is still throwing an error when trying to import from the URL, but I was able to import that RAW file contents. They need a bit of formatting work, but at least this beats building it from scratch.
Any chance we can have this link added into Swagger directly as a JSON? Seems that's the popular method for importing from the searching I did:
https://stackoverflow.com/questions/39072216/how-to-import-swagger-apis-into-postman
https://www.geeksforgeeks.org/how-to-import-swagger-apis-into-postman/
https://www.c-sharpcorner.com/article/import-swagger-apis-into-postman-collection/
@miloschwartz commented on GitHub (Jun 5, 2025):
I was able to import the YAML OpenAPI 3.0.0 from the docs by clicking Import in the top left of Postman pasting the raw text in the input and then selecting the OpenAPI 3 option:
@kmanwar89 commented on GitHub (Jun 6, 2025):
I mentioned that in my comment as well that I was able to import the YAML. Those links I shared seem to indicate that a standard practice is to have the YAML linked within Swagger's interface so it can be accessed directly. Not sure if that's something you're interested in implementing or if its part of the spec or not, but just thought I'd point it out.
I'll consider this issue closed in the interim, thanks again!