Request: Postman collection? #376

Closed
opened 2025-11-13 11:58:32 -06:00 by GiteaMirror · 8 comments
Owner

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.

Image

Thanks!

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. <img width="337" alt="Image" src="https://github.com/user-attachments/assets/e3d0519a-af03-469c-8ea1-6281535f70ee" /> Thanks!
Author
Owner

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

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

@kmanwar89 commented on GitHub (May 28, 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?

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

@kmanwar89 commented on GitHub (May 28, 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? 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...
Author
Owner

@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

@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
Author
Owner

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

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

@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

@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
Author
Owner

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

@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/
Author
Owner

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

Image Image
@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: <img width="747" alt="Image" src="https://github.com/user-attachments/assets/2908cf55-c6ef-4259-85f5-1079e0791294" /> <img width="1626" alt="Image" src="https://github.com/user-attachments/assets/a95b5daa-e0e1-456f-82a2-1481161c1bf4" />
Author
Owner

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

@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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#376