-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
8 changed files
with
195 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
# Comment specification of proto file | ||
|
||
Avoid adding empty lines between comments symbols `//`.If there is a blank line in the comments, the tool(protoc-gen-doc) will generate malformed documents. | ||
bad case: | ||
``` | ||
message BadCase{ | ||
// XXXXXXXX | ||
// | ||
// XX | ||
// | ||
// XXXXXX | ||
field A | ||
} | ||
``` | ||
good case: | ||
``` | ||
message GoodCase{ | ||
// XXXXXXXX | ||
// XX | ||
// XXXXXX | ||
field A | ||
} | ||
``` | ||
Or you can use another annotation symbol directly `/* */` | ||
|
||
|
||
If you want to have some comment in your proto files, but don't want them to be part of the docs, you can simply prefix the comment with `@exclude`. | ||
Example: include only the comment for the id field | ||
``` | ||
/** | ||
* @exclude | ||
* This comment won't be rendered | ||
*/ | ||
message ExcludedMessage { | ||
string id = 1; // the id of this message. | ||
string name = 2; // @exclude the name of this message | ||
/* @exclude the value of this message. */ | ||
int32 value = 3; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
# proto文件注释规范 | ||
|
||
避免在注释符号`//`之间添加空行,否则生成工具protoc-gen-doc会生成格式错乱的文档。 | ||
一个坏示例: | ||
``` | ||
message BadCase{ | ||
// XXXXXXXX | ||
// | ||
// XX | ||
// | ||
// XXXXXX | ||
field A | ||
} | ||
``` | ||
一个好示例: | ||
``` | ||
message GoodCase{ | ||
// XXXXXXXX | ||
// XX | ||
// XXXXXX | ||
field A | ||
} | ||
``` | ||
或者你可以直接使用另一种注释符号:`/* */` | ||
|
||
假如你想添加一些注释在proto文件里,但不想让它们出现在生成的文档里,你可以在注释里使用`@exclude`前缀。 | ||
示例:只包括id字段的注释 | ||
``` | ||
/** | ||
* @exclude | ||
* This comment won't be rendered | ||
*/ | ||
message ExcludedMessage { | ||
string id = 1; // the id of this message. | ||
string name = 2; // @exclude the name of this message | ||
/* @exclude the value of this message. */ | ||
int32 value = 3; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<name>runtime-sdk-parent</name> | ||
<description>SDK for Runtime</description> | ||
<url>https://github.com/mosn/layotto</url> | ||
|
||
<modules> | ||
<module>sdk</module> | ||
<module>examples</module> | ||
|
@@ -97,4 +101,97 @@ | |
</plugins> | ||
</build> | ||
|
||
<licenses> | ||
<license> | ||
<name>The Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<developer> | ||
<name>seeflood</name> | ||
<email>[email protected]</email> | ||
<organization>MOSN</organization> | ||
<organizationUrl>https://mosn.io/</organizationUrl> | ||
</developer> | ||
<developer> | ||
<name>MentosL</name> | ||
<email>[email protected]</email> | ||
<organization>MOSN</organization> | ||
<organizationUrl>https://mosn.io/</organizationUrl> | ||
</developer> | ||
<developer> | ||
<name>ZLBer</name> | ||
<email>[email protected]</email> | ||
<organization>MOSN</organization> | ||
<organizationUrl>https://mosn.io/</organizationUrl> | ||
</developer> | ||
<developer> | ||
<name>kevinten10</name> | ||
<organizationUrl>http://www.kevinten.com/</organizationUrl> | ||
</developer> | ||
</developers> | ||
|
||
<scm> | ||
<url>https://github.com/mosn/layotto</url> | ||
<connection>scm:git:https://github.com/mosn/layotto.git</connection> | ||
</scm> | ||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.10.4</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>1.6.7</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> | ||
<autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
</profile> | ||
</profiles> | ||
</project> |