[main] INFO o.o.c.config.CodegenConfigurator -
VERBOSE MODE: ON. Additional debug options are injected
[debugOpenAPI] prints the OpenAPI specification as interpreted by the codegen
[debugModels] prints models passed to the template engine
[debugOperations] prints operations passed to the template engine
[debugSupportingFiles] prints additional data passed to the template engine
[main] INFO o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' has been deprecated in the 5.x release. Composed schema name: null. Title: null
[main] INFO o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' has been deprecated in the 5.x release. Composed schema name: null. Title: null
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: 0
Errors:
-attribute paths.'/payments/{transactionId}/token/commit'. Declared path parameter transactionId needs to be defined as a path parameter in path or operation level
-attribute paths.'/payments/{transactionId}/token/revert'. Declared path parameter transactionId needs to be defined as a path parameter in path or operation level
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:541)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:568)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:424)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Describe the bug
Code generation using OpenApi only works if --skip-validate-spec argument is used.
Current using: https://docs.paytrail.com/paytrail-api.yaml
OpenApi Generator:
https://openapi-generator.tech/#try
Error
Second way of testing the errors:
Go to: https://editor.swagger.io/
Click on file -> Import URL
Paste: https://docs.paytrail.com/paytrail-api.yaml
Errors should be shown: