Build a libGDX-Compatible OpenAPI Java Client Generator
Budget: $30 – $250 NZD
# Overview
I need a custom OpenAPI client generator that outputs Java code compatible with the LibGDX framework, and be GWT compatible (Google Web Toolkit). The generator should use LibGDX's HttpRequest and Json classes instead of incompatible libraries like OkHttp, Retrofit, or Gson.
# Requirements
• Use OpenAPI Generator with Mustache templates / custom generator
• Generate API classes that use com.badlogic.gdx.Net.HttpRequest for requests
• Generate model classes that use com.badlogic.gdx.utils.Json for serialization/deserialization
• Ensure all generated code is GWT-compatible, desktop compatible, mobile compatible in an empty libGDX project.
# Deliverables
• Working code generator (CLI or integrated into a Gradle task)
• Template files (.mustache) for models, API classes, etc.
• Sample libGDX project that uses the compiled client API without errors on GWT/HTML, desktop, mobile builds
• Instructions for usage
# Tech Stack
• Java 8 compatible
• LibGDX (latest version)
• OpenAPI Generator (latest version)
• Mustache templates / custom OpenAPI generator
# Notes
• API Schema JSON is attached.
• Generating the template: `openapi-generator author template -g java --library webclient`
• Generate the base client API to work on:
`openapi-generator generate -i openapiDetailed.json -g java -o client-api-java --skip-validate-spec`
• Use `./gradlew html:dist` to verify GWT compatibility in the libGDX project.
# Links
• OpenAPI Generator: https://github.com/OpenAPITools/openapi-generator
• OpenAPI Custom Generator Docs (using moustache template language): https://openapi-generator.tech/docs/customization
• Creating a libGDX project: https://libgdx.com/wiki/start/project-generation
• Creating libGDX HTTP requests: https://libgdx.com/wiki/networking#:~:text=To%20send%20an%20HTTP%20Request%20use%20this%3A
• libGDX Json: https://libgdx.com/wiki/utils/reading-and-writing-json
I need a custom OpenAPI client generator that outputs Java code compatible with the LibGDX framework, and be GWT compatible (Google Web Toolkit). The generator should use LibGDX's HttpRequest and Json classes instead of incompatible libraries like OkHttp, Retrofit, or Gson.
# Requirements
• Use OpenAPI Generator with Mustache templates / custom generator
• Generate API classes that use com.badlogic.gdx.Net.HttpRequest for requests
• Generate model classes that use com.badlogic.gdx.utils.Json for serialization/deserialization
• Ensure all generated code is GWT-compatible, desktop compatible, mobile compatible in an empty libGDX project.
# Deliverables
• Working code generator (CLI or integrated into a Gradle task)
• Template files (.mustache) for models, API classes, etc.
• Sample libGDX project that uses the compiled client API without errors on GWT/HTML, desktop, mobile builds
• Instructions for usage
# Tech Stack
• Java 8 compatible
• LibGDX (latest version)
• OpenAPI Generator (latest version)
• Mustache templates / custom OpenAPI generator
# Notes
• API Schema JSON is attached.
• Generating the template: `openapi-generator author template -g java --library webclient`
• Generate the base client API to work on:
`openapi-generator generate -i openapiDetailed.json -g java -o client-api-java --skip-validate-spec`
• Use `./gradlew html:dist` to verify GWT compatibility in the libGDX project.
# Links
• OpenAPI Generator: https://github.com/OpenAPITools/openapi-generator
• OpenAPI Custom Generator Docs (using moustache template language): https://openapi-generator.tech/docs/customization
• Creating a libGDX project: https://libgdx.com/wiki/start/project-generation
• Creating libGDX HTTP requests: https://libgdx.com/wiki/networking#:~:text=To%20send%20an%20HTTP%20Request%20use%20this%3A
• libGDX Json: https://libgdx.com/wiki/utils/reading-and-writing-json