Skip to content

openapi generator is failing #17

Description

@dpalic

using this definition

openApiSpec=https://raw.githubusercontent.com/InterNetX/internetx-swagger-files/master/src/domainrobot.json

and openapi generator via maven

            <!-- https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin -->
            <plugin>
               <groupId>org.openapitools</groupId>
               <artifactId>openapi-generator-maven-plugin</artifactId>
               <version>7.0.0</version>
               <executions>
                  <execution>
                     <goals>
                        <goal>generate</goal>
                     </goals>
                     <configuration>
                        <inputSpec>${openApiSpec}</inputSpec>
                        <generatorName>java</generatorName>
                        <library>resttemplate</library>
                        <apiPackage>${openApiPackage}</apiPackage>
                        <modelPackage>${openApiModelPackage}</modelPackage>
                        <useSpringBoot3>true</useSpringBoot3>
                        <generateApis>true</generateApis>
                        <generateApiDocumentation>false</generateApiDocumentation>
                        <generateApiTests>true</generateApiTests>
                        <generateModels>true</generateModels>
                        <generateModelDocumentation>true</generateModelDocumentation>
                        <generateModelTests>false</generateModelTests>
                        <generateSupportingFiles>true</generateSupportingFiles>
                        <legacyDiscriminatorBehavior>false</legacyDiscriminatorBehavior>
                        <configOptions>
                           <delegatePattern>true</delegatePattern>
                           <additionalModelTypeAnnotations>@lombok.Data</additionalModelTypeAnnotations>
                        </configOptions>
                     </configuration>
                  </execution>
               </executions>
            </plugin>

results into

domainrobot.json [0:0]: unexpected error in Open-API generation
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: 8, Warning count: 2
Errors: 
	-attribute paths.'/bulk/clientAccount/{label}/clientCustomer'. Declared path parameter label needs to be defined as a path parameter in path or operation level
	-attribute paths.'/bulk/zone/_domainSafe'(put).operationId is repeated
	-attribute paths.'/bulk/zone/_domainSafe'(delete).operationId is repeated
	-attribute paths.'/bulk/domain/_domainSafe'(delete).operationId is repeated
	-attribute paths.'/zone/{name}/{systemNameServer}/zoneQuery/_search'. Declared path parameter name needs to be defined as a path parameter in path or operation level
	-attribute paths.'/zone/{name}/{systemNameServer}/zoneQuery/_search'. Declared path parameter systemNameServer needs to be defined as a path parameter in path or operation level
	-attribute paths.'/bulk/domain/_domainSafe'(put).operationId is repeated
	-attribute paths.'/object/_assignment'(put).operationId is repeated
Warnings: 
	-attribute paths.'/bulk/clientAccount/{label}/clientCustomer'. Declared path parameter label needs to be defined as a path parameter in path or operation level
	-attribute paths.'/bulk/zone/_domainSafe'(put).operationId is repeated
	-attribute paths.'/bulk/zone/_domainSafe'(delete).operationId is repeated
	-attribute paths.'/bulk/domain/_domainSafe'(delete).operationId is repeated
	-attribute paths.'/zone/{name}/{systemNameServer}/zoneQuery/_search'. Declared path parameter name needs to be defined as a path parameter in path or operation level
	-attribute paths.'/zone/{name}/{systemNameServer}/zoneQuery/_search'. Declared path parameter systemNameServer needs to be defined as a path parameter in path or operation level
	-attribute paths.'/bulk/domain/_domainSafe'(put).operationId is repeated
	-attribute paths.'/object/_assignment'(put).operationId is repeated

using

<skipValidateSpec>true</skipValidateSpec>
it is generating but still leaving the feeling that api client will sooner or later fail on the above named issues.
Can someone clarify or even fix the openapi definition?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions