[GH-ISSUE #1710] Code generator for Swift OpenAPI #1703

Open
opened 2026-03-03 19:53:39 +03:00 by kerem · 5 comments
Owner

Originally created by @Sparklydust on GitHub (Jul 6, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1710

Description

WWDC23 show us a new way to work with HTTP server APIs. Could it be possible to implement it within the Code Generator feature of Proxyman?

Why this feature/change is important?

As it is a new feature from Apple to develop Swift application, it would be very helpful to have the Code Generator feature on Proxyman for this solution.

It can help us understand faster how to create a request with this new package plugin.

Originally created by @Sparklydust on GitHub (Jul 6, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1710 ## Description WWDC23 show us a new way to work with HTTP server APIs. Could it be possible to implement it within the Code Generator feature of Proxyman? - [Meet Swift OpenAPI Generator - WWDC23 - Videos](https://developer.apple.com/videos/play/wwdc2023/10171/) - [swift-openapi-generator](https://github.com/apple/swift-openapi-generator) ## Why this feature/change is important? As it is a new feature from Apple to develop Swift application, it would be very helpful to have the Code Generator feature on Proxyman for this solution. It can help us understand faster how to create a request with this new package plugin.
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 7, 2023):

I'm not sure if it's possible 🤔

From what I know, Swift OpenAPI requires the openapi.yaml and some runtime packages in order to generate the code. It's a lot of work if I support it in Proxyman app.


You can copy your URL as cURL, then using it on Swift OpenAPI ?

<!-- gh-comment-id:1624854419 --> @NghiaTranUIT commented on GitHub (Jul 7, 2023): I'm not sure if it's possible 🤔 From what I know, Swift OpenAPI requires the `openapi.yaml` and some runtime packages in order to generate the code. It's a lot of work if I support it in Proxyman app. ------ You can copy your URL as cURL, then using it on Swift OpenAPI ?
Author
Owner

@Sparklydust commented on GitHub (Jul 7, 2023):

You can copy your URL as cURL, then using it on Swift OpenAPI ?
Probably yes. I will start digging into the framework to get to know it better.

This tikcet was just a suggestion of adding a new feature in Proxyman as I was reading the documentation and ran into the Code Generator section.

Feel free to close the issue if you think that it would be too much work.

<!-- gh-comment-id:1625135684 --> @Sparklydust commented on GitHub (Jul 7, 2023): > You can copy your URL as cURL, then using it on Swift OpenAPI ? Probably yes. I will start digging into the framework to get to know it better. This tikcet was just a suggestion of adding a new feature in Proxyman as I was reading the documentation and ran into the Code Generator section. Feel free to close the issue if you think that it would be too much work.
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 26, 2023):

Hi @Sparklydust May I ask:

  • You mean that you'd like to generate an OpenAPI document (JSON or YALM) from a list of captured requests/responses by Proxyman app ?
<!-- gh-comment-id:1780292497 --> @NghiaTranUIT commented on GitHub (Oct 26, 2023): Hi @Sparklydust May I ask: - You mean that you'd like to generate an OpenAPI document (JSON or YALM) from a list of captured requests/responses by Proxyman app ?
Author
Owner

@Sparklydust commented on GitHub (Oct 26, 2023):

Hi @NghiaTranUIT
Yes, I meant to generate the yaml file for the OpenAPI feature like it is mentioned in the [Proxyman Documentation(https://docs.proxyman.io/advanced-features/code-generator) for the Swift + URLSession as an example.

<!-- gh-comment-id:1781138333 --> @Sparklydust commented on GitHub (Oct 26, 2023): Hi @NghiaTranUIT Yes, I meant to generate the `yaml` file for the OpenAPI feature like it is mentioned in the [Proxyman Documentation(https://docs.proxyman.io/advanced-features/code-generator) for the `Swift + URLSession` as an example.
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 26, 2023):

Thanks. I guess I can support it by converting to HAR or cURL, then converting back to OpenAPI 3.0. The reason is there are some npm libraries can easily do it.

<!-- gh-comment-id:1781182017 --> @NghiaTranUIT commented on GitHub (Oct 26, 2023): Thanks. I guess I can support it by converting to HAR or cURL, then converting back to OpenAPI 3.0. The reason is there are some npm libraries can easily do it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1703
No description provided.