Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'head' and 'options' mapping produces bad imports #192

Closed
beeondev opened this issue Sep 13, 2023 · 1 comment
Closed

'head' and 'options' mapping produces bad imports #192

beeondev opened this issue Sep 13, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@beeondev
Copy link

beeondev commented Sep 13, 2023

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
Copy link
Member

hauner commented Sep 13, 2023

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!

@hauner hauner added the bug Something isn't working label Sep 13, 2023
@hauner hauner added this to the 2023.4 milestone Sep 13, 2023
hauner added a commit that referenced this issue Sep 17, 2023
@hauner hauner closed this as completed Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants