Skip to content

Spec validation issues #1

@cliffano

Description

@cliffano

OAG 7.4.0 raises spec validation error below, which requires the addition of --skip-validate-spec on generate calls in Swaggy C 4.3.0 .

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: 3, Warning count: 4
Errors:
	-attribute components.schemas.CreateFineTuneRequest.default is not of type `array`
	-attribute components.schemas.CreateCompletionRequest.default is not of type `object`
	-attribute components.schemas.CreateChatCompletionRequest.default is not of type `object`
Warnings:
	-attribute components.schemas.CreateFineTuneRequest.default is not of type `array`
	-attribute components.schemas.CreateCompletionRequest.default is not of type `object`
	-attribute components.schemas.CreateChatCompletionRequest.default is not of type `object`

	at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:717)
	at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:744)
	at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527)
	at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
	at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)

However, there is a possibility of misleading message as per OpenAPITools/openapi-generator#1324

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions