Java Code Examples for io.swagger.annotations.Api#hidden()

The following examples show how to use io.swagger.annotations.Api#hidden() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ApiInfo.java    From swagger-more with Apache License 2.0 5 votes vote down vote up
private void readApi() {
    Api api = findAnnotation(Api.class);
    if (nonNull(api)) {
        hidden |= api.hidden();
        for (String tag : api.tags()) {
            if (!StringUtils.isEmpty(tag)) {
                this.tag = tag;
            }
        }
    }
}
 
Example 2
Source File: ApiWrap.java    From stategen with GNU Affero General Public License v3.0 5 votes vote down vote up
public Boolean getHidden() {
    if (hidden == null) {
        Api apiAnno = getApiAnno();
        hidden = apiAnno == null || apiAnno.hidden();
    }
    return hidden;
}
 
Example 3
Source File: RpcReaderExtension.java    From sofa-rpc with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isReadable(ReaderContext context) {
    final Api apiAnnotation = context.getCls().getAnnotation(Api.class);
    // read do not have Api annotation cls, skip hidden cls
    return apiAnnotation == null || (context.isReadHidden() || !apiAnnotation.hidden());
}
 
Example 4
Source File: DubboReaderExtension.java    From swagger-dubbo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isReadable(ReaderContext context) {
	final Api apiAnnotation = context.getCls().getAnnotation(Api.class);
	// read do not have Api annotation cls, skip hidden cls
	return apiAnnotation == null || (context.isReadHidden() || !apiAnnotation.hidden());
}