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

@ApiHeader annotation appears to be broken #212

Open
MrGraversen opened this issue Nov 24, 2016 · 1 comment
Open

@ApiHeader annotation appears to be broken #212

MrGraversen opened this issue Nov 24, 2016 · 1 comment

Comments

@MrGraversen
Copy link

MrGraversen commented Nov 24, 2016

Hi, I've defined a controller action like so:

    @ApiMethod
    @ApiHeaders(
            headers = {
                    @ApiHeader(name = "H1", description = "h1-description")
            }
    )
    @RequestMapping(method = RequestMethod.POST)
    public ResponseEntity<CreateAccountResultDTO> createAccount(@RequestBody CreateAccountRequiredDTO createAccountRequired)

JSONDoc appears to be working fine; I can add descriptions and such, and they show up fine, but headers don't. Any ideas?

@warnoleto
Copy link

It seems the component AbstractSpringJSONDocScanner.mergeApiMethodDoc used to integrate jsondoc to spring is giving priority to the headers declarated in RequestMapping.headers attribute.

When merging apiMethodDoc it explicitly ignores the headers (and others) attribute. I wonder the impact of removing the ignore fields .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants