I have to generate code from yaml file, in my swagger maven plugin I put :


even if it says iinterfaceOnly>true however the codegen generate an interface with default implementation as follow:

@ApiOperation(value = "", nickname = "billetsFichiersHealthGet", notes = "Obtient l'état de santé de l'API. ", tags={  })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK"),
        @ApiResponse(code = 200, message = "Erreur", response = Error.class) })
    @RequestMapping(value = "/bills/health",
        produces = "application/json", 
        consumes = "",
        method = RequestMethod.GET)
    default ResponseEntity<Void> billetsFichiersHealthGet() {
        if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default BilletsApi interface so no example is generated");
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

How can I disable generation of default interface method and just have definition in interface and not default implementation.

When I remove the following two tags it works


However my models are using localdatetime and so I should be on java8 and cant remove these two tags really

Any Idea ?

0 Answers