0

I downloaded the OpenAI's OpenAPI Spec file and tried to generate and compile the client and faced a few issues and wonder if anyone knows the fix for it.

This is the specification: https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml

However, this spec have some validation errors, so I used --skip-validate-spec to ignore them.

Steps I followed

Generated the code

openapi-generator generate \
 -i openapi.documented.yml \
 -g java \
 -o openai-java-client \
 --additional-properties=useJakartaEe=true,dateLibrary=java8,apiPackage=org.openapitools.client.api,modelPackage=org.openapitools.client.model \
 --skip-validate-spec ;

Compiled the code:

cd openai-java-client;
mvn clean install;

Error observed

openai-java-client/src/main/java/org/openapitools/client/model/ComputerAction.java:[476,11] error: reference to Type is ambiguous
asked Nov 30, 2025 at 6:36
2
  • Curious why not use the existing openai java SDK? github.com/openai/openai-java It's generated from the OpenAPI spec using Stainless. Commented Dec 4, 2025 at 16:06
  • I like to get this error resolved, probably going to make something useful along the way. I'll give a go with the sdk too. Thanks. Commented Dec 9, 2025 at 10:24

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.