Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/googleapis/toolkit into d…
Browse files Browse the repository at this point in the history
…iscogapic
  • Loading branch information
garrettjonesgoogle committed May 27, 2017
2 parents a5014a4 + 4de4575 commit b153234
Show file tree
Hide file tree
Showing 156 changed files with 6,595 additions and 3,589 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/google/api/codegen/CommentPatterns.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class CommentPatterns {
public static final Pattern BACK_QUOTE_PATTERN = Pattern.compile("(?<!`)``?(?!`)");
public static final Pattern ABSOLUTE_LINK_PATTERN =
Pattern.compile("\\[([^\\]]+)\\]\\((\\p{Alpha}+:[^\\)]+)\\)");
public static final Pattern CLOUD_LINK_PATTERN =
public static final Pattern RELATIVE_LINK_PATTERN =
Pattern.compile("\\[([^\\]]+)\\]\\(((?!\\p{Alpha}+:)[^\\)]+)\\)");
public static final Pattern PROTO_LINK_PATTERN =
Pattern.compile("\\[([^\\]]+)\\]\\[([A-Za-z_][A-Za-z_.0-9]*)?\\]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private SampleView createSampleView(SampleTransformerContext context) {
discoveryBuildParams.add(String.format("'%s'", config.apiVersion()));
switch (config.authType()) {
case NONE:
discoveryBuildParams.add("http=httplib2.Http(timeout=60)");
break;
case API_KEY:
discoveryBuildParams.add("developerKey=" + credentialsVarName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public static List<GapicProvider<? extends Object>> defaultCreate(
providers.add(messageProvider);
}
}
if (generatorConfig.enableTestGenerator() && id.equals(RUBY)) {
if (generatorConfig.enableTestGenerator()) {
GapicCodePathMapper rubyTestPathMapper =
CommonGapicCodePathMapper.newBuilder()
.setPrefix("test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class JavaGrpcPackageMetadataTransformer extends JavaPackageMetadataTrans
private final Map<String, String> snippetsOutput =
ImmutableMap.of(
"LICENSE.snip", "LICENSE",
"metadatagen/java/grpc/package.snip", "build.gradle");
"metadatagen/java/grpc/build.gradle.snip", "build.gradle");

@Override
protected Map<String, String> getSnippetsOutput() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class JavaProtoPackageMetadataTransformer extends JavaPackageMetadataTran
private final Map<String, String> snippetsOutput =
ImmutableMap.of(
"LICENSE.snip", "LICENSE",
"metadatagen/java/grpc/package.snip", "build.gradle");
"metadatagen/java/grpc/build.gradle.snip", "build.gradle");

@Override
protected Map<String, String> getSnippetsOutput() {
Expand Down
44 changes: 0 additions & 44 deletions src/main/java/com/google/api/codegen/metacode/FieldSetting.java

This file was deleted.

30 changes: 0 additions & 30 deletions src/main/java/com/google/api/codegen/metacode/InitCode.java

This file was deleted.

26 changes: 0 additions & 26 deletions src/main/java/com/google/api/codegen/metacode/InitCodeLine.java

This file was deleted.

This file was deleted.

67 changes: 0 additions & 67 deletions src/main/java/com/google/api/codegen/metacode/MapInitCodeLine.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public OptionalArrayMethodView generateMethod(GapicMethodContext context) {
apiMethod.type(ClientMethodType.OptionalArrayMethod);
}
apiMethod.apiClassName(namer.getApiWrapperClassName(context.getInterfaceConfig()));
apiMethod.fullyQualifiedApiClassName(
namer.getFullyQualifiedApiWrapperClassName(context.getInterfaceConfig()));
apiMethod.apiVariableName(namer.getApiWrapperVariableName(context.getInterfaceConfig()));
apiMethod.apiModuleName(namer.getApiWrapperModuleName());
InitCodeOutputType initCodeOutputType =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ private InitCodeLineView generateStructureInitCodeLine(

String typeName = typeTable.getAndSaveNicknameFor(item.getType());
surfaceLine.typeName(typeName);
surfaceLine.fullyQualifiedTypeName(typeTable.getFullNameFor(item.getType()));
surfaceLine.typeConstructor(namer.getTypeConstructor(typeName));

surfaceLine.fieldSettings(getFieldSettings(context, item.getChildren().values()));
Expand Down Expand Up @@ -391,6 +392,8 @@ private InitValueView getInitValue(GapicMethodContext context, InitCodeNode item

initValue.apiWrapperName(
context.getNamer().getApiWrapperClassName(context.getInterfaceConfig()));
initValue.fullyQualifiedApiWrapperName(
context.getNamer().getFullyQualifiedApiWrapperClassName(context.getInterfaceConfig()));
initValue.formatFunctionName(
context
.getNamer()
Expand Down
Loading

0 comments on commit b153234

Please sign in to comment.