use of com.palantir.conjure.parser.services.ParameterName in project conjure by palantir.
the class ConjureParserUtils method parseArgs.
private static List<ArgumentDefinition> parseArgs(Map<ParameterName, com.palantir.conjure.parser.services.ArgumentDefinition> args, HttpPath httpPath, ReferenceTypeResolver typeResolver) {
ImmutableList.Builder<ArgumentDefinition> resultBuilder = ImmutableList.builder();
for (Map.Entry<ParameterName, com.palantir.conjure.parser.services.ArgumentDefinition> entry : args.entrySet()) {
com.palantir.conjure.parser.services.ArgumentDefinition original = entry.getValue();
ArgumentName argName = ArgumentName.of(entry.getKey().name());
ParameterType paramType = parseParameterType(original, argName, httpPath);
ArgumentDefinition.Builder builder = ArgumentDefinition.builder().argName(argName).type(original.type().visit(new ConjureTypeParserVisitor(typeResolver))).paramType(paramType).docs(original.docs().map(Documentation::of)).safety(original.safety().map(ConjureParserUtils::parseLogSafety)).markers(parseMarkers(original.markers(), typeResolver)).tags(original.tags().stream().peek(tag -> Preconditions.checkArgument(!tag.isEmpty(), "tag must not be empty")).collect(Collectors.toSet()));
resultBuilder.add(builder.build());
}
return resultBuilder.build();
}
Aggregations