Skip to content

Commit

Permalink
Merge branch 'google:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
vbothe23 authored Jul 25, 2023
2 parents b00b686 + 892ad88 commit 5a0d3fd
Show file tree
Hide file tree
Showing 14 changed files with 249 additions and 256 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ public HapiConverter<Schema> visitComposite(String elementName,
String elementTypeUrl,
List<StructureField<HapiConverter<Schema>>> children) {

Preconditions.checkArgument(!children.isEmpty());
String recordName = DefinitionVisitorsUtil.recordNameFor(elementPath);
String recordNamespace = DefinitionVisitorsUtil.namespaceFor(basePackage, elementTypeUrl);
String fullName = recordNamespace + "." + recordName;
Expand Down Expand Up @@ -743,6 +744,7 @@ private static String lowercase(String string) {

@Override
public int getMaxDepth(String elementTypeUrl, String path) {
// return 2;
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public void testCompile() throws IOException {

// Ensure common types were generated
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/r4/avro/Period.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/r4/avro/Coding.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/r4/avro/PatientCoding.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/r4/avro/ValueSet.java"));

// The specific profile should be created in the expecter4b-package.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public void testCompile() throws IOException {

// Ensure common types were generated
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/Period.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/Coding.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/PatientCoding.java"));
Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/ValueSet.java"));

// The specific profile should be created in the expected sub-package.
Expand Down
Loading

0 comments on commit 5a0d3fd

Please sign in to comment.