Skip to content

Conversation

JamieMagee
Copy link
Contributor

This builds upon #1925, and allows for @ApiImplicitParams at class level, as well as meta-annotations which use @ApiImplicitParams at class level. For example (adapted from #1867) :

@Retention(value = RetentionPolicy.RUNTIME)
@ApiImplicitParams({@ApiImplicitParam(name = "x-my-custom-auth-header-that-keeps-repeating", required = true, dataType = "string", paramType = "header",defaultValue = "SOME_TEST_TOKEN_VALUE")})
public @interface MySwaggerImplicitSecurityHeader { }

@Api(value = "lots of API endpoints here...")
@MySwaggerImplicitSecurityHeader
public class LotsOfMethodsController {

  @ApiOperation(value = "Method1")
  public void ApiMethod1(){}

  @ApiOperation(value = "Method2")
  public void ApiMethod2(){}

  //...with more of these ApiMethods down the line

} 

@JamieMagee JamieMagee force-pushed the ImplicitParams-at-Class-level branch from 0305ca4 to a55edbf Compare September 13, 2016 13:37
@fehguy fehguy merged commit 0ed8dce into swagger-api:master Dec 19, 2016
@fehguy fehguy modified the milestone: v1.5.11 Dec 21, 2016
@JamieMagee JamieMagee deleted the ImplicitParams-at-Class-level branch January 11, 2017 09:57
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

Successfully merging this pull request may close these issues.

2 participants