File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
fern/products/api-def/grpc-pages/services Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -416,4 +416,33 @@ service NotificationService {
416416}
417417```
418418
419- gRPC services provide a strongly-typed, high-performance foundation for building distributed systems with clear contracts between clients and servers.
419+ gRPC services provide a strongly-typed, high-performance foundation for building distributed systems with clear contracts between clients and servers.
420+
421+ ## Custom options
422+
423+ Fern provides custom Protocol Buffer options to enhance your API Reference documentation and generated code.
424+
425+ ### API navigation name
426+
427+ Use the ` fern.summary ` option to set an explicit display name for endpoints that's more user-friendly than the default RPC method name.
428+
429+ <CodeBlock title = " services.proto" >
430+ ``` protobuf
431+ // Import Fern custom options
432+ import "fern/options.proto";
433+
434+ service CommentsService {
435+ // Description of the endpoint
436+ rpc CreateComment(CreateCommentRequest) returns (CreateCommentResponse) {
437+ option (google.api.http) = {
438+ post: "/comments/v1/comments"
439+ response_body: "comment"
440+ body: "*"
441+ };
442+
443+ // Display name shown in navigation
444+ option (fern.summary) = "Create your comment";
445+ }
446+ }
447+ ```
448+ </CodeBlock >
You can’t perform that action at this time.
0 commit comments