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

2.0.0.RELEASE globalOperationParameters失效 #220

Closed
CrackerGit opened this issue Sep 17, 2021 · 2 comments · Fixed by #221
Closed

2.0.0.RELEASE globalOperationParameters失效 #220

CrackerGit opened this issue Sep 17, 2021 · 2 comments · Fixed by #221
Labels

Comments

@CrackerGit
Copy link

升级版本之后发现swagger.globalOperationParameters失效

@CrackerGit CrackerGit changed the title 2.2.0.RELEASE globalOperationParameters失效 2.0.0.RELEASE globalOperationParameters失效 Sep 18, 2021
@CrackerGit
Copy link
Author

when i use "swagger.globalOperationParameters" with 2.0.0.RELEASE , i found it can't work .
By looking at the source code , i found "globalOperParameters" not set in Docket.
Currently I can only add BeanPostProcessor to handle.

@llin6025
Copy link
Collaborator

  1. globalOperationParameters is deprecated when use "DocumentationType.OAS_30"
  /**
   * Adds default parameters which will be applied to all operations.
   *
   * @param operationParameters parameters which will be globally applied to all operations
   * @return this Docket use @see {@link Docket#globalRequestParameters} instead
   * @deprecated
   */
  @Deprecated
  public Docket globalOperationParameters(List<springfox.documentation.service.Parameter> operationParameters) {
    this.globalOperationParameters.addAll(nullToEmptyList(operationParameters));
    return this;
  }
  1. We will add globalRequestParameters instead globalOperationParameters

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

Successfully merging a pull request may close this issue.

2 participants