diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/PackageOverviewFile.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/PackageOverviewFile.java index 647c4a88..a5c95058 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/PackageOverviewFile.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/PackageOverviewFile.java @@ -3,6 +3,7 @@ import static com.microsoft.build.BuilderUtil.LANGS; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.docfx.doclet.RepoMetadata; import com.microsoft.lookup.PackageLookup; @@ -376,7 +377,7 @@ private static String createHtmlTable( .append("") - .append(packageChildSummary.uid) + .append(withLineBreaks(packageChildSummary.uid)) .append("\n") .append("\n") .append(packageChildSummary.summary != null ? packageChildSummary.summary : "") @@ -417,4 +418,18 @@ public String getFileName() { public void setFileName(String fileName) { this.fileName = fileName; } + + @VisibleForTesting + static String withLineBreaks(String uid) { + Pattern p = Pattern.compile("[a-zA-Z\\d][a-z\\d]+\\.|[A-Z][a-z]+"); + Matcher m = p.matcher(uid); + if (!m.find()) { + return uid; + } + StringBuilder s = new StringBuilder(); + while (m.find()) { + m.appendReplacement(s, "" + m.group()); + } + return s.toString(); + } } diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/build/PackageOverviewFileTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/build/PackageOverviewFileTest.java index baf6f8fa..9a7ca4a2 100644 --- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/build/PackageOverviewFileTest.java +++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/build/PackageOverviewFileTest.java @@ -45,4 +45,17 @@ public void testExtractPackageBaseURIBeforeVersion() { assertEquals("N/A", packageInfo_4.get(0)); assertEquals("N/A", packageInfo_4.get(1)); } + + @Test + public void testWithLineBreaks() { + String uid = + "com.google.cloud.securitycenter.v2.AttackPathName.OrganizationLocationSimulationValuedResourceAttackPathBuilder"; + String converted = PackageOverviewFile.withLineBreaks(uid); + assertEquals( + "com.google.cloud.securitycenter.v2.AttackPathName.OrganizationLocationSimulationValuedResourceAttackPathBuilder", + converted); + + String nonMatchable = "123non-matchable"; + assertEquals(nonMatchable, PackageOverviewFile.withLineBreaks(nonMatchable)); + } } diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult.yml index 80ec1aed..1bf26120 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult.yml @@ -273,4 +273,4 @@ references: - uid: "T>valueOf(java.lang.Class" name: "T>valueOf(Class" nameWithType: "T>valueOf(Class" - fullName: "T>valueOf(java.lang.Class" \ No newline at end of file + fullName: "T>valueOf(java.lang.Class" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.md index 14650eb1..fd7cbe5c 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.md @@ -19,7 +19,7 @@ Class Description -com.microsoft.samples.agreements.AgreementDetailsCollectionOperations +com.microsoft.samples.agreements.AgreementDetailsCollectionOperations Deprecated. Use AgreementMetaData instead. @@ -27,13 +27,13 @@ Description Agreement details collection operations implementation class. -com.microsoft.samples.agreements.AgreementMetaData +com.microsoft.samples.agreements.AgreementMetaData The AgreementMetaData provides metadata about the agreement type that partner can provide confirmation of customer acceptance. -com.microsoft.samples.agreements.ResourceCollection +com.microsoft.samples.agreements.ResourceCollection Contains a collection of resources with JSON properties to represent the output Type of objects in collection @@ -48,7 +48,7 @@ Interface Description -com.microsoft.samples.agreements.IAgreementDetailsCollection +com.microsoft.samples.agreements.IAgreementDetailsCollection Deprecated. This one is deprecated :( diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.md index 4e65c14c..91cfe392 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.md @@ -19,22 +19,22 @@ Class Description -com.microsoft.samples.commentinheritance.Animal +com.microsoft.samples.commentinheritance.Animal Animal. -com.microsoft.samples.commentinheritance.Dog +com.microsoft.samples.commentinheritance.Dog Canine and man's best friend. -com.microsoft.samples.commentinheritance.Herbivorous.Plant +com.microsoft.samples.commentinheritance.Herbivorous.Plant -com.microsoft.samples.commentinheritance.Mammal +com.microsoft.samples.commentinheritance.Mammal Mammal. @@ -48,27 +48,27 @@ Interface Description -com.microsoft.samples.commentinheritance.Carnivorous +com.microsoft.samples.commentinheritance.Carnivorous Marks an Animal that eats other animals. -com.microsoft.samples.commentinheritance.Herbivorous +com.microsoft.samples.commentinheritance.Herbivorous Marks animals that eat plants. -com.microsoft.samples.commentinheritance.Omnivorous +com.microsoft.samples.commentinheritance.Omnivorous Eats plants and animals. -com.microsoft.samples.commentinheritance.Organism +com.microsoft.samples.commentinheritance.Organism -com.microsoft.samples.commentinheritance.Viviparous +com.microsoft.samples.commentinheritance.Viviparous Mammals that give birth to young that develop within the mother's body. diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.Builder.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.Builder.yml index dce80be2..f72252ed 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.Builder.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.Builder.yml @@ -1608,4 +1608,4 @@ references: - uid: "?,?>,java.lang.Void>)" name: "?,?>,Void>)" nameWithType: "?,?>,Void>)" - fullName: "?,?>,java.lang.Void>)" \ No newline at end of file + fullName: "?,?>,java.lang.Void>)" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.AudioSourceCase.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.AudioSourceCase.yml index 3f3224c4..391dbdfd 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.AudioSourceCase.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.AudioSourceCase.yml @@ -365,4 +365,4 @@ references: - uid: "T>valueOf(java.lang.Class" name: "T>valueOf(Class" nameWithType: "T>valueOf(Class" - fullName: "T>valueOf(java.lang.Class" \ No newline at end of file + fullName: "T>valueOf(java.lang.Class" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.yml index 979c33f4..ce59af02 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.RecognitionAudio.yml @@ -1256,4 +1256,4 @@ references: - uid: "ListT>makeMutableCopy(ListT,int)" name: "ListT>makeMutableCopy(ListT,int)" nameWithType: "ListT>makeMutableCopy(ListT,int)" - fullName: "ListT>makeMutableCopy(ListT,int)" \ No newline at end of file + fullName: "ListT>makeMutableCopy(ListT,int)" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.Builder.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.Builder.yml index 48f81f4e..9fb5f2ad 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.Builder.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.Builder.yml @@ -733,4 +733,4 @@ references: - uid: "?,?>,java.lang.Void>)" name: "?,?>,Void>)" nameWithType: "?,?>,Void>)" - fullName: "?,?>,java.lang.Void>)" \ No newline at end of file + fullName: "?,?>,java.lang.Void>)" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml index a51808b5..800a05eb 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml @@ -786,4 +786,4 @@ references: - uid: "B>toBuilder()" name: "B>toBuilder()" nameWithType: "B>toBuilder()" - fullName: "B>toBuilder()" \ No newline at end of file + fullName: "B>toBuilder()" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.md index 940fb336..8f10b407 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.md @@ -21,7 +21,7 @@ Client Description -com.microsoft.samples.google.SpeechClient +com.microsoft.samples.google.SpeechClient Service Description: Service that implements Google Cloud Speech API. @@ -39,7 +39,7 @@ Settings Description -com.microsoft.samples.google.ProductSearchSettings +com.microsoft.samples.google.ProductSearchSettings Settings class to configure an instance of ProductSearchClient. @@ -47,7 +47,7 @@ Settings class to configure an instance of -com.microsoft.samples.google.SpeechSettings +com.microsoft.samples.google.SpeechSettings Settings class to configure an instance of SpeechClient. @@ -64,12 +64,12 @@ Class Description -com.microsoft.samples.google.ProductSearchSettings.Builder +com.microsoft.samples.google.ProductSearchSettings.Builder Builder for ProductSearchSettings. -com.microsoft.samples.google.RecognitionAudio +com.microsoft.samples.google.RecognitionAudio Contains audio data in the encoding specified in the RecognitionConfig. @@ -77,7 +77,7 @@ Builder for ProductSearchSettings. returns google.rpc.Code.INVALID_ARGUMENT. See -com.microsoft.samples.google.SpeechSettings.Builder +com.microsoft.samples.google.SpeechSettings.Builder Builder for SpeechSettings. @@ -91,7 +91,7 @@ Interface Description -com.microsoft.samples.google.BetaApi +com.microsoft.samples.google.BetaApi Indicates a public API that can change at any time, and has no guarantee of API stability and backward-compatibility. @@ -99,7 +99,7 @@ Indicates a public API that can change at any time, and has no guarantee of API

Usage guidelines: -com.microsoft.samples.google.ValidationException.Supplier +com.microsoft.samples.google.ValidationException.Supplier @@ -113,7 +113,7 @@ Enum Description -com.microsoft.samples.google.RecognitionAudio.AudioSourceCase +com.microsoft.samples.google.RecognitionAudio.AudioSourceCase @@ -127,7 +127,7 @@ Exception Description -com.microsoft.samples.google.ValidationException +com.microsoft.samples.google.ValidationException Exception thrown if there is a validation problem with a path template, http config, or related framework methods. Comes as an illegal argument exception subclass. Allows to globally set a diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.md index 7ad4133c..8f3b533b 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.md @@ -17,7 +17,7 @@ Client Description -com.microsoft.samples.google.v1.SpeechClient +com.microsoft.samples.google.v1.SpeechClient Service Description: Service that implements Google Cloud Speech API. diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder.yml index 9fa53bd5..9945f7a7 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder.yml @@ -775,4 +775,4 @@ references: - uid: "B>build()" name: "B>build()" nameWithType: "B>build()" - fullName: "B>build()" \ No newline at end of file + fullName: "B>build()" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.yml index 8951f4cf..7cf8bb9a 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.SpeechStubSettings.yml @@ -906,4 +906,4 @@ references: isExternal: true name: "StubSettings" nameWithType: "StubSettings" - fullName: "com.google.api.gax.rpc.StubSettings" \ No newline at end of file + fullName: "com.google.api.gax.rpc.StubSettings" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.md index 4bac0192..6bb92abb 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1.stub.md @@ -23,21 +23,21 @@ Stub Description -com.microsoft.samples.google.v1.stub.GrpcSpeechStub +com.microsoft.samples.google.v1.stub.GrpcSpeechStub gRPC stub implementation for the Speech service API.

This class is for advanced usage and reflects the underlying API directly. -com.microsoft.samples.google.v1.stub.HttpJsonSpeechStub +com.microsoft.samples.google.v1.stub.HttpJsonSpeechStub REST stub implementation for the Speech service API.

This class is for advanced usage and reflects the underlying API directly. -com.microsoft.samples.google.v1.stub.SpeechStub +com.microsoft.samples.google.v1.stub.SpeechStub Base stub class for the Speech service API. @@ -54,7 +54,7 @@ Settings Description -com.microsoft.samples.google.v1.stub.SpeechStubSettings +com.microsoft.samples.google.v1.stub.SpeechStubSettings Settings class to configure an instance of com.google.cloud.speech.v1p1beta1.stub.SpeechStub. @@ -71,7 +71,7 @@ Class Description -com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder +com.microsoft.samples.google.v1.stub.SpeechStubSettings.Builder Builder for SpeechStubSettings. diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.md index 364177af..95af627b 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.md @@ -28,7 +28,7 @@ Client Description -com.microsoft.samples.google.v1beta.SpeechClient +com.microsoft.samples.google.v1beta.SpeechClient Service Description: Service that implements Google Cloud Speech API. diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.md index 29535775..1c81a5b4 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.md @@ -28,7 +28,7 @@ Client Description -com.microsoft.samples.google.v1p1alpha.SpeechClient +com.microsoft.samples.google.v1p1alpha.SpeechClient Service Description: Service that implements Google Cloud Speech API. diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.md index a67a89e0..90f0188b 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.md @@ -19,43 +19,43 @@ Class Description -com.microsoft.samples.BasePartnerComponent +com.microsoft.samples.BasePartnerComponent Holds common partner component properties and behavior. All components should inherit from this class. The context object type. -com.microsoft.samples.BasePartnerComponentString +com.microsoft.samples.BasePartnerComponentString Holds common partner component properties and behavior. The context is string type by default. -com.microsoft.samples.ExceptionHandler +com.microsoft.samples.ExceptionHandler Exception retry algorithm implementation used by RetryHelper. -com.microsoft.samples.ExceptionHandler.Builder +com.microsoft.samples.ExceptionHandler.Builder ExceptionHandler builder. -com.microsoft.samples.KeyValuePair +com.microsoft.samples.KeyValuePair -com.microsoft.samples.Link +com.microsoft.samples.Link -com.microsoft.samples.Subpackage +com.microsoft.samples.Subpackage -com.microsoft.samples.SuperHero +com.microsoft.samples.SuperHero Hero is the main entity we will be using to something @@ -69,12 +69,12 @@ Interface Description -com.microsoft.samples.ExceptionHandler.Interceptor +com.microsoft.samples.ExceptionHandler.Interceptor -com.microsoft.samples.IPartner +com.microsoft.samples.IPartner The main entry point into using the partner SDK functionality. Represents a partner and encapsulates all the behavior attached to partners. Use this interface to get to the partner's @@ -90,7 +90,7 @@ Enum Description -com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult +com.microsoft.samples.ExceptionHandler.Interceptor.RetryResult diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.md index 31676c97..da7068c9 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.md @@ -19,7 +19,7 @@ Class Description -com.microsoft.samples.offers.Offer +com.microsoft.samples.offers.Offer Represents a form of product availability to customer diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.md b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.md index 443caf83..6c0e02f5 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.md +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.md @@ -19,7 +19,7 @@ Class Description -com.microsoft.samples.subpackage.Person +com.microsoft.samples.subpackage.Person Class that describes some person @@ -27,12 +27,12 @@ Class that describes some person -com.microsoft.samples.subpackage.Person.IdentificationInfo +com.microsoft.samples.subpackage.Person.IdentificationInfo Class that describes person's identification -com.microsoft.samples.subpackage.Tuple +com.microsoft.samples.subpackage.Tuple @@ -46,7 +46,7 @@ Interface Description -com.microsoft.samples.subpackage.Display +com.microsoft.samples.subpackage.Display Do you see some First code block? @@ -62,7 +62,7 @@ Enum Description -com.microsoft.samples.subpackage.Person.IdentificationInfo.Gender +com.microsoft.samples.subpackage.Person.IdentificationInfo.Gender Enum describes person's gender @@ -76,7 +76,7 @@ Exception Description -com.microsoft.samples.subpackage.CustomException +com.microsoft.samples.subpackage.CustomException