本文整理匯總了Java中io.swagger.models.Path.setParameters方法的典型用法代碼示例。如果您正苦於以下問題:Java Path.setParameters方法的具體用法?Java Path.setParameters怎麽用?Java Path.setParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類io.swagger.models.Path
的用法示例。
在下文中一共展示了Path.setParameters方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: path2UtilSubscriptions
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path path2UtilSubscriptions(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
}
ServiceDocument subscriptionState = template(ServiceSubscriptionState.class);
path.setGet(opDefault(subscriptionState));
io.swagger.models.Operation deleteOrPost = new io.swagger.models.Operation();
deleteOrPost.addParameter(paramBody(template(ServiceSubscriber.class)));
deleteOrPost.addTag(this.currentTag.getName());
deleteOrPost.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(subscriptionState)));
path.setDelete(deleteOrPost);
path.setPost(deleteOrPost);
return path;
}
示例2: path2UtilConfig
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path path2UtilConfig(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
}
io.swagger.models.Operation op = new io.swagger.models.Operation();
op.addTag(this.currentTag.getName());
op.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceConfiguration.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.setGet(op);
op = new io.swagger.models.Operation();
op.addTag(this.currentTag.getName());
op.setParameters(
Collections.singletonList(paramBody(ServiceConfigUpdateRequest.class)));
op.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceConfiguration.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.setPatch(op);
return path;
}
示例3: path2UtilTemplate
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path path2UtilTemplate(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
path.setGet(opDefault(template(ServiceDocument.class)));
} else {
// idParam == null -> it is a factory
path.setGet(opDefault(template(ServiceDocumentQueryResult.class)));
}
return path;
}
示例4: path2UtilAvailable
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path path2UtilAvailable(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
}
io.swagger.models.Operation get = new io.swagger.models.Operation();
get.addTag(this.currentTag.getName());
get.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(),
Operation.STATUS_CODE_UNAVAILABLE, responseNoContent(),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.setGet(get);
io.swagger.models.Operation patchOrPut = new io.swagger.models.Operation();
patchOrPut.addTag(this.currentTag.getName());
patchOrPut.setParameters(Collections.singletonList(paramBody(ServiceStat.class)));
patchOrPut.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceStats.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.put(patchOrPut);
path.patch(patchOrPut);
return path;
}
示例5: path2UtilStats
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path path2UtilStats(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
}
io.swagger.models.Operation get = new io.swagger.models.Operation();
get.addTag(this.currentTag.getName());
get.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceStats.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.set(Service.Action.GET.name().toLowerCase(), get);
io.swagger.models.Operation put = new io.swagger.models.Operation();
put.addTag(this.currentTag.getName());
put.setParameters(Arrays.asList(
paramNamedBody(template(ServiceStats.class)),
paramNamedBody(ServiceStats.ServiceStat.class)));
put.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceStats.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.put(put);
io.swagger.models.Operation post = new io.swagger.models.Operation();
post.addTag(this.currentTag.getName());
post.setParameters(Collections.singletonList(paramBody(ServiceStat.class)));
post.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceStats.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()));
path.post(post);
path.patch(post);
return path;
}
示例6: defaultInstancePath
import io.swagger.models.Path; //導入方法依賴的package包/類
private Path defaultInstancePath() {
Path path = new Path();
path.setParameters(Collections.singletonList(paramId()));
return path;
}