本文整理汇总了Java中io.swagger.models.auth.AuthorizationValue类的典型用法代码示例。如果您正苦于以下问题:Java AuthorizationValue类的具体用法?Java AuthorizationValue怎么用?Java AuthorizationValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AuthorizationValue类属于io.swagger.models.auth包,在下文中一共展示了AuthorizationValue类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SwaggerDiff
import io.swagger.models.auth.AuthorizationValue; //导入依赖的package包/类
/**
* @param oldSpec
* @param newSpec
* @param auths
* @param version
*/
private SwaggerDiff(String oldSpec, String newSpec, List<AuthorizationValue> auths,
String version) {
if (SWAGGER_VERSION_V2.equals(version)) {
SwaggerParser swaggerParser = new SwaggerParser();
oldSpecSwagger = swaggerParser.read(oldSpec, auths, true);
newSpecSwagger = swaggerParser.read(newSpec, auths, true);
} else {
SwaggerCompatConverter swaggerCompatConverter = new SwaggerCompatConverter();
try {
oldSpecSwagger = swaggerCompatConverter.read(oldSpec, auths);
newSpecSwagger = swaggerCompatConverter.read(newSpec, auths);
} catch (IOException e) {
logger.error("cannot read api-doc from spec[version_v1.x]", e);
return;
}
}
if (null == oldSpecSwagger || null == newSpecSwagger) { throw new RuntimeException(
"cannot read api-doc from spec."); }
}
示例2: appendValue
import io.swagger.models.auth.AuthorizationValue; //导入依赖的package包/类
private static void appendValue(URL url, AuthorizationValue value, Collection<AuthorizationValue> to) {
if (value instanceof ManagedValue) {
if (!((ManagedValue) value).process(url)) {
return;
}
}
to.add(value);
}
示例3: getAuthorizationValue
import io.swagger.models.auth.AuthorizationValue; //导入依赖的package包/类
public AuthorizationValue getAuthorizationValue() {
return authorizationValue;
}
示例4: setAuthorizationValue
import io.swagger.models.auth.AuthorizationValue; //导入依赖的package包/类
public void setAuthorizationValue(AuthorizationValue authorizationValue) {
this.authorizationValue = authorizationValue;
}
示例5: compare
import io.swagger.models.auth.AuthorizationValue; //导入依赖的package包/类
public static SwaggerDiff compare(String oldSpec, String newSpec,
List<AuthorizationValue> auths, String version) {
return new SwaggerDiff(oldSpec, newSpec, auths, version).compare();
}