Skip to content
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

Issues with the specification? #241

Open
dcigic-wwc opened this issue Apr 24, 2024 · 2 comments
Open

Issues with the specification? #241

dcigic-wwc opened this issue Apr 24, 2024 · 2 comments

Comments

@dcigic-wwc
Copy link

dcigic-wwc commented Apr 24, 2024

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?

@apollo-heidal
Copy link

Same issue here.

@Ovid
Copy link

Ovid commented Jul 13, 2024

@dcigic-wwc I see you're trying to generate for C#. As a workaround, you might try this? https://github.com/RageAgainstThePixel/OpenAI-DotNet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants