Hi there
I am trying to generate a Swift 5 package from the openapi spec, but the document fails the validation. If I override that, it generates a but with numerous errors that do not build. I have tried running it in other languages with the same result.
Here is the output I get from openapi-generator.
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: 32, Warning count: 0
Errors:
-attribute paths.’/exchanges/ticker’(get).parameters.[sort].sort is unexpected
-attribute components.parameters.per-page.[per-page].schemas.min is unexpected
-attribute paths.’/exchanges/ticker’(get).parameters.[convert].convert is unexpected
-attribute paths.’/orders/batches’(get).parameters.[date].date is unexpected
-attribute paths.’/exchange-markets/ticker’(get).parameters.[search].search is unexpected
-attribute paths.’/volume/history’(get).parameters.[start].start is unexpected
-attribute paths.’/volume/history’(get).parameters.[end].end is unexpected
-attribute paths.’/candles’(get).parameters.[start].interval-start is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[sort].sort is unexpected
-attribute paths.’/candles’(get).parameters.[end].interval-end is unexpected
-attribute paths.’/exchange_candles’(get).parameters.[start].interval-start is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[platform-currency].platform-currency is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[convert].convert is unexpected
-attribute paths.’/exchange-markets/ticker’(get).parameters.[status].status is unexpected
-attribute paths.’/exchanges/ticker’(get).parameters.[status].status is unexpected
-attribute paths.’/exchange-markets/ticker’(get).parameters.[interval].default is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[quote-currency].quote-currency is unexpected
-attribute paths.’/exchange-markets/ticker’(get).parameters.[convert].default is unexpected
-attribute paths.’/orders/snapshot’(get).parameters.[at].at is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[interval].interval is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[filter].filter is unexpected
-attribute paths.’/exchanges/ticker’(get).parameters.[type].type is unexpected
-attribute components.schemas.GlobalTickerInterval.items is missing
-attribute paths.’/currencies/ticker’(get).responses.200.content.‘application/json’.schema.items is missing
-attribute paths.’/exchange-markets/ticker’(get).parameters.[sort].sort is unexpected
-attribute paths.’/volume/history’(get).parameters.[convert].convert is unexpected
-attribute paths.’/exchanges/ticker’(get).responses.200.content.‘application/json’.schema.items is missing
-attribute paths.’/exchanges/ticker’(get).parameters.[interval].interval is unexpected
-attribute paths.’/currencies/ticker’(get).parameters.[status].status is unexpected
-attribute components.parameters.per-page.[per-page].schemas.max is unexpected
-attribute components.parameters.page.[page].schemas.min is unexpected
-attribute paths.’/markets/candles’(get).parameters.[start].interval-start is unexpectedat org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:554)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:581)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:433)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
There are only two types of errors so this may actually be an easy fix.
Type 1:
-attribute paths.’/exchange-markets/ticker’(get).parameters.[search].search is unexpected
Type 2:
paths.’/currencies/ticker’(get).responses.200.content.‘application/json’.schema.items is missing
Please help, this is quite critical for my project.
Thanks, Paul