openai-openapi
openai-openapi copied to clipboard
Issues with the specification?
Trying to generate code with the openapi-generator-cli-6.2.0.jar
/Users/xxxx/Applications/Rider.app/Contents/jbr/Contents/Home/bin/java -jar /Users/xxxx/Library/Caches/JetBrains/Rider2024.1/openapi/codegen/71aab8d6724718f581fedb5bf4fd5866/openapi-generator-cli-6.2.0.jar generate -g csharp -i /Users/xxxx/dev/ConsoleApp4/ConsoleApp4/OpenAi.yaml -o /Users/xxxx/dev/ConsoleApp4/gen --additional-properties=packageName=OpenAi.Client,targetFramework=net8.0,sourceFolder=,modelPropertyNaming=PascalCase,netCoreProjectFile=true
I am getting these errors:
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 2, Warning count: 32
Errors:
-attribute components.schemas.CreateCompletionRequest.default is not of type `object`
-attribute components.schemas.CreateChatCompletionRequest.default is not of type `object`
If I disable validation with --skip-validate-spec it generates code but there are a bunch of classes missing.
Not sure if this is an issue with the specs or the tool?
Same issue here.
@dcigic-wwc I see you're trying to generate for C#. As a workaround, you might try this? https://github.com/RageAgainstThePixel/OpenAI-DotNet