Skip to content

ibaranga/openapi-generator-spring-http-interface-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A sample project, reproducing the issue mentioned in OpenAPITools/openapi-generator#19710 (comment)

When using org.openapitools:openapi-generator-gradle-plugin with library: 'spring-http-interface', the @Parameter annotations from the default Spring template, located at JavaSpring/paramDoc.mustache, are somehow inherited to the generated client-interfaces which are causing compile errors due to missing imports

Steps to reproduce

  • run ./gradlew openApiGenerate
  • notice the generated interfaces, like build/generate-resources/main/src/main/java/org/openapitools/api/PetApi.java
    @HttpExchange(
        method = "POST",
        value = "/pet",
        accept = { "application/json", "application/xml" },
        contentType = "application/json"
    )
    ResponseEntity<Pet> addPet(
        @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody Pet pet
    );

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages