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
Springfox #845: Configuration for global Operation-Parameters. #861
Conversation
Added support for configuration of global operation parameters.
@GitVhaos sorry I had forgotten about this! i'll take a look and merge it in if everything looks ok! Thanks very much for your pr! 👍 |
@GitVhaos would be awesome if you could also update the docs 👍 |
I`m new to gitHub... Where can I update the docs? ^^ |
Depends on what you're trying to document... but here is the directory where the documentation lives. |
Is there a way to hide/show these global parameters by |
@thadc23 yes there is way, but at the moment you'd have to partition your apis into multiple dockets. So it will apply global parameters per docket. I believe there is a feature request to allow global parameters using a selector predicate. But it may be marked as a "Someday Maybe" feature. (I'll update this thread once I find it) Let me know if you need any help working through it. |
@dilipkrish Were you ever able to find the feature for global params using a selector predicate? For a relatively small change and to implement filtering by method, I could add a List of HttpMethods to the Parameter and change the OperationParameterReader to filter the global list by the current operation's http method before adding the globals to the parameters for that operation. To ensure backwards compatibility, I would add a second constructor to the Parameter that accepts a list of HttpMethods and have the current constructor call the new one with the List of all HttpMethods. Thoughts? |
I think there is a solution described here that is preferable. |
Basically creating a plugin that adds parameters conditionally. |
Got it working using the plugin. Thanks. |
👍 |
__ Can we set GlobalOperationParameters in Docket Bean at run time as a authentication Token: docket.select() Please share a way to to it Thanks in advance. |
1 similar comment
__ Can we set GlobalOperationParameters in Docket Bean at run time as a authentication Token: docket.select() Please share a way to to it Thanks in advance. |
Added support for configuration of global operation parameters.