Skip to content

Commit 986c2fa

Browse files
committed
feat(docs): publish protobuf to refdocs
1 parent 25dd334 commit 986c2fa

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

dev/src/Command/DocFxCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,10 @@ private function validate(ClassNode $class, OutputInterface $output): bool
297297
{
298298
$valid = true;
299299
$emptyRef = '<options=bold>empty</>';
300-
$isGenerated = $class->isProtobufMessageClass() || $class->isProtobufEnumClass() || $class->isServiceClass();
300+
$isGenerated = $class->isProtobufMessageClass()
301+
|| $class->isProtobufEnumClass()
302+
|| $class->isServiceClass()
303+
|| $class->isProtobufLibrary();
301304
foreach (array_merge([$class], $class->getMethods(), $class->getConstants()) as $node) {
302305
foreach ($this->getInvalidXrefs($node->getContent()) as $invalidRef) {
303306
if (isset(self::$allowedReferenceFailures[$node->getFullname()])

dev/src/DocFx/Node/ClassNode.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ public function isProtobufMessageClass(): bool
7070
return false;
7171
}
7272

73+
public function isProtobufLibrary(): bool
74+
{
75+
return 0 === strpos($this->getNamespace(), '\Google\Protobuf');
76+
}
77+
7378
public function isGapicEnumClass(): bool
7479
{
7580
// returns true if the class extends \Google\Protobuf\Internal\Message

0 commit comments

Comments
 (0)