openapi-processor/openapi-processor-spring

'head' and 'options' mapping produces bad imports

beeondev opened this issue · 1 comments

Hi,

It seem that 'head' and 'options' mapping just not compile because :

  • Some unused import just not exist in spring-web :
    import org.springframework.web.bind.annotation.HeadMapping;
    import org.springframework.web.bind.annotation.OptionsMapping;
  • Some import are never declared :
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestMethod;

options-and-head-mapping.ZIP

So for the moment i end up with just a workaround to exclude thoses endpoint.
First, i try with "exclude" mapping directive, but i realize that it is useless, because the mapping still generated (with another name as explained in documentation). I finally exclude it from openapi.yaml spec.

best regards.

hauner commented

I can reproduce the issue, it is broken.

there is code that tries to handle this but looks a bit strange. Too bad the corresponding test doesn't include head, options and trace examples. oops.

Thanks for reporting!