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

Ignore ApiParam. #167

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface ApiParam {
/** Ignores parameter in documentation. */
boolean ignore() default false;

/** Name of the parameter */
String name() default "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ class JaxrsApiSpecParser(val _hostClass: Class[_], _apiVersion: String, _swagger
var ignoreParam = false
for (pa <- paramAnnotations) {
pa match {
case apiParam: ApiParam => parseApiParam(docParam, apiParam, method)
case apiParam: ApiParam => {
ignoreParam = apiParam.ignore()
parseApiParam(docParam, apiParam, method)
}
case wsParam: QueryParam => {
docParam.name = readString(wsParam.value, docParam.name)
docParam.paramType = readString(TYPE_QUERY, docParam.paramType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class JerseyApiSpecParser(val _hostClass: Class[_], _apiVersion: String, _swagge
for (pa <- paramAnnotations) {
pa match {
case param: ApiParam => {
ignoreParam = param.ignore()
parseApiParam(docParam, param, method)
}
case param: QueryParam => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ private class PlayApiSpecParser(_hostClass: Class[_], _apiVersion: String, _swag
var ignoreParam = false
for (pa <- paramAnnotations) {
pa match {
case apiParam: ApiParam => parseApiParam(docParam, apiParam, method)
case apiParam: ApiParam => {
ignoreParam = apiParam.ignore()
parseApiParam(docParam, apiParam, method)
}
case wsParam: QueryParam => {
docParam.name = readString(wsParam.value, docParam.name)
docParam.paramType = readString(TYPE_QUERY, docParam.paramType)
Expand Down