-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[v2] (RFC) Csharp netcore generator supports UnityWebRequest library #14870
Conversation
...re/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iBicha @wing328 I was consumed with console ports and wasn't able to put any time into my draft PR, so thanks for putting effort into getting a real PR in-place.
re: There's probably edge cases to deal with (IL2CPP, console support, etc), but perfect is the enemy of good! I hope we can have a foot in the door with this version and incrementally improve.
Our game is live and this code is proven to work on the following platforms:
- Nintendo Switch (IL2CPP)
- PS4 + PS5 (IL2CPP)
- Xbox Series X|S (IL2CPP)
- iOS, tvOS, macOS (IL2CPP)
- Windows (IL2CPP and Mono)
- Steamdeck (IL2CPP via Windows emulation)
- Linux (IL2CPP and Mono)
The platforms that are untested but I wouldn't expect issues with:
- Android
- WebGL
- Xbox One
Conveniently, no platform specific modifications were required to support the consoles. 👍
...i-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
Outdated
Show resolved
Hide resolved
...i-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/csharp-netcore/libraries/unity/ApiClient.mustache
Outdated
Show resolved
Hide resolved
Added a couple of fixes to support webgl |
...tor/src/main/resources/csharp-netcore/libraries/unityWebRequest/ConnectionException.mustache
Show resolved
Hide resolved
@wing328 how can we push this PR forward? |
@iBicha is there anyway to test this locally to ensure the output (auto-generated API client) compiles? I'm no expert in unity. If there's any command or instruction, please share with me. Ideally we want to setup the tests in the CI (e.g. github workflow) but that's not day 1 requirement. |
I added a Unity specific sample (it made sense) For manually testing (assuming you don't any anything setup)
These are the very basic steps to test manually. Additional work can be done to improve with automation:
|
thanks for sharing the details in using and testing the auto-generated client.
given that you've already tested it locally, I think we can go ahead to merge this so that more users can try it out and provide feedback. |
about the CI failure, https://github.com/OpenAPITools/openapi-generator/actions/runs/4376814010/jobs/7670317597 I'll fix that after merging this PR. |
This is a follow up to #13890, Closes #853
#13890 was a great start (thank you for the work you've done!), but it sits in a private fork so was harder to work with
On top of it, a few changes has been made:
I would love to see this more thoroughly tested, and validate it works well with different spec files, but from testing so far it seems good enough!
There's probably edge cases to deal with (IL2CPP, console support, etc), but perfect is the enemy of good! I hope we can have a foot in the door with this version and incrementally improve.
Also, I can't believe it's been almost 5 years since #853 !
Tagging the technical committee as per contribution guidelines
@mandrean @frankyjuang @shibayan @Blackclaws @lucamazzanti
And @justonia @wing328 for visibility