-
Notifications
You must be signed in to change notification settings - Fork 10
W-21311839-Add-gRPC-to-ACB-docs-CP #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Crispy-Salesforce
merged 35 commits into
MS2026-03-06-ACB
from
W-21311839-Add-gRPC-to-ACB-docs-CP
Mar 12, 2026
Merged
Changes from 21 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
9399e67
W-21311839-Add-gRPC-to-ACB-docs-CP
Crispy-Salesforce 00eb123
W-21311839-Fix-format-issues-CP
Crispy-Salesforce 4ba99d6
W-21311839-Replace-quick-actions-with-Create-CP
Crispy-Salesforce c16c05e
W-21311839-Fix-title-CP
Crispy-Salesforce f5e1bb9
W-21311839-Fix-title-UI-consistency-CP
Crispy-Salesforce e987f4d
W-21311839-Add-gRPC-to-docs-CP
Crispy-Salesforce 9ef62b9
W-21311839-Update-API-specs-CP
Crispy-Salesforce 0787858
W-21311839-Add-gRPC-implementation-CP
Crispy-Salesforce 940cd4c
W-21311839-Remove-images-CP
Crispy-Salesforce 314870a
W-21311839-Add-publish-to-Exchange-CP
Crispy-Salesforce 2d15bb5
W-21311839-Address-Dhairya-feedback-CP
Crispy-Salesforce 1157fa9
W-21311839-Address-Eng-feedback-CP
Crispy-Salesforce 83989fe
W-21311839-Add-links-to-gRPC-connector-CP
Crispy-Salesforce e2d7769
Update des-design-grpc-api-spec.adoc
failup b79db0e
Update des-design-grpc-api-spec.adoc
failup d1e1b1c
Update des-design-grpc-api-spec.adoc
failup 6ef0c26
Update des-publish-grpc-api-to-exchange.adoc
failup 2d05e8a
Update imp-implement-grpc-api-spec.adoc
failup e4ff6a3
Update imp-implement-grpc-api-spec.adoc
failup 1407a98
Update imp-implement-grpc-api-spec.adoc
failup 46b462b
W-21311839-Fix-IDE-name-CP
Crispy-Salesforce 09da2a8
W-21311839-Address-stakeholder-feedback-CP
Crispy-Salesforce f862ea2
W-21311839-Address-stakeolder-feedback-CP
Crispy-Salesforce e29b334
W-21311839-Address-stakeholder-feedback-CP
Crispy-Salesforce d081e0e
W-21311839-Address-stakeholder-feedback-CP
Crispy-Salesforce 7fde095
W-21464928-Rename-section-to-Supported-Languages-for-API-Specs-CP
Crispy-Salesforce 5621d9c
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce 52a63bb
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce 8a2d020
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce af67dc9
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce b125584
W-21464928-Address-CrisV-feedback-CP
Crispy-Salesforce 838cce1
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce 21d9e0d
Apply suggestions from code review
Crispy-Salesforce d5dba57
Apply suggestion from @Cristian-Venticinque
Crispy-Salesforce 14e3b56
Merge branch 'MS2026-03-06-ACB' into W-21311839-Add-gRPC-to-ACB-docs-CP
Crispy-Salesforce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,160 @@ | ||
| = Designing a gRPC API Specification with Anypoint Code Builder | ||
| :page-deployment-options: cloud-ide, desktop-ide | ||
|
|
||
| include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] | ||
|
|
||
| Anypoint Code Builder supports designing gRPC API specifications using Protocol Buffers (Protobuf 3). Create and edit `.proto` files, import reusable Protobuf libraries from Anypoint Exchange, and use syntax highlighting and validation. When you design or publish your spec, the IDE generates a binary descriptor (`.protobin`) so Mule runtime can consume the service metadata while building the Mule application. | ||
|
|
||
| Use the Protocol Buffers 3 (Protobuf 3) specification language to design gRPC APIs. gRPC uses HTTP/2 and supports four RPC patterns: | ||
|
|
||
| * Unary | ||
| * Client streaming | ||
| * Server streaming | ||
| * Bidirectional streaming | ||
|
|
||
| You author service and message definitions in `.proto` files and can reuse shared types by importing Protobuf fragments (libraries) from Exchange. | ||
|
|
||
| == Before You Begin | ||
|
|
||
| * xref:start-acb.adoc[]. | ||
| * Understand the basics of gRPC and Protocol Buffers (Protobuf 3). See https://grpc.io/docs/what-is-grpc/introduction/[Introduction to gRPC]. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
| * Have some familiarity with xref:access-management::business-groups.adoc[]. | ||
| + | ||
| When you publish your API spec to Exchange from Anypoint Code Builder, the IDE requests the name of the business group. See xref:access-management::business-groups.adoc[]. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| == Create a New gRPC API Specification Project | ||
|
|
||
| To create a gRPC API spec project in Anypoint Code Builder: | ||
|
|
||
| include::partial$acb-reusable-steps.adoc[tags="open-ide"] | ||
|
|
||
| . From *Create*, click *Design an API*: | ||
| . Complete the *API Specification* form: | ||
| + | ||
| [%header,cols="20a,60a"] | ||
| |=== | ||
| | Field Name | Field Value | ||
|
|
||
| | *Project Name* | Unique name for your project. | ||
|
|
||
| This name is used as the API spec title in Exchange, the name of the spec file, and the name of the project's root directory. | ||
|
|
||
| include::partial$acb-reusable-steps.adoc[tags="no-project-name-reuse"] | ||
| | *Project Location* | Your home directory or another directory you create. | ||
|
|
||
| See xref:start-add-folders.adoc[]. | ||
|
|
||
| include::partial$acb-reusable-steps.adoc[tags="proj-directory-warn"] | ||
| | *API Type* | The type of API spec to create. | ||
|
|
||
| Select *gRPC API* to create a gRPC project. | ||
|
|
||
| | *Specification Language* | The language for the API specification. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| Select *Protobuf 3* for gRPC API projects. | ||
| |=== | ||
| . Click *Create Project*. | ||
| + | ||
| If prompted, trust the authors of the files in the folder. | ||
| + | ||
| When the project is ready, the API project opens with a default `.proto` file in the Editor view. | ||
| + | ||
| . Continue designing your gRPC API spec. | ||
| + | ||
| As you enter elements, use xref:start-discover-ui.adoc#auto-complete[auto-complete] (or press Ctrl+Space) to display available options within the context. | ||
|
|
||
| == Organize gRPC API Projects and Dependencies | ||
|
|
||
| A new gRPC API project includes: | ||
|
|
||
| * A root `.proto` file (for example, `main.proto` or a file named after your project) that defines your service and messages. | ||
| * A `protobuf-libraries` directory (or equivalent) for storing and organizing Protobuf fragments (reusable libraries) that you add as dependencies. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| You edit the main `.proto` file to define `service`, `rpc`, and `message` blocks. Dependencies from Exchange or local fragments are resolved from the `protobuf-libraries` area so you can reference shared message types and services across specs. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| == Publish a gRPC Fragment to Exchange | ||
|
|
||
| You can publish reusable `.proto` definitions as a fragment to Anypoint Exchange so other gRPC API specifications can import them as dependencies. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| A fragment contains shared definitions such as `message`, `enum`, or `service` blocks. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| === Publish the Fragment | ||
|
|
||
| To publish a gRPC fragment to Exchange: | ||
|
|
||
| . Ensure that you're logged in to Anypoint Platform. | ||
| . Open the project that contains your reusable `.proto` files. | ||
| . From the IDE, select the publish action. | ||
| . When prompted: | ||
| + | ||
| * Select the business group. | ||
| * Provide the asset name and version. | ||
| * Add any required metadata. | ||
| . Confirm the publication. | ||
|
|
||
| After publishing, the fragment appears in Exchange as an API Fragment asset and can be added as a dependency to other gRPC API specification projects. | ||
|
|
||
| To use the fragment in another gRPC API specification: | ||
|
|
||
| . Add the fragment as a dependency from Exchange. | ||
| . Import the corresponding `.proto` file in your main specification. | ||
| . Validate that all references resolve correctly. | ||
|
|
||
| == Import a Protobuf Library from Anypoint Exchange | ||
|
|
||
| You can import reusable Protobuf libraries (fragments) from Anypoint Exchange and add them as dependencies to your gRPC API project. You can reuse messages and services across multiple specifications. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| To use a Protobuf fragment published to Exchange: | ||
|
|
||
| . Ensure you're logged in to Anypoint Platform. | ||
| . Open your gRPC API project. | ||
| . Open the Command Palette (Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows). | ||
| . Select *MuleSoft: Add Fragment dependency from Exchange*. | ||
| . Search for the Protobuf fragment you need and select the version to add. | ||
| . After the dependency is added, the library is available under the project. | ||
| . In your main `.proto` file, use `import` to reference the library's package and message or service definitions. For example: | ||
| + | ||
| [source,protobuf] | ||
| ---- | ||
| syntax = "proto3"; | ||
|
|
||
| import "path/to/library.proto"; | ||
|
|
||
| service MyService { | ||
| rpc GetOrder(OrderRequest) returns (OrderResponse); | ||
| } | ||
| ---- | ||
| . Save the spec. Anypoint Code Builder resolves the dependency and validates references. You can reuse messages and services from the imported library across your gRPC specs. | ||
|
|
||
| == Define Technical Details for gRPC Specifications | ||
|
|
||
|
Crispy-Salesforce marked this conversation as resolved.
|
||
| === Declare Communication Patterns for gRPC Services | ||
|
|
||
| Anypoint Code Builder and Mule runtime support all four gRPC RPC patterns: | ||
|
|
||
| * **Unary** – Single request, single response. | ||
| * **Client streaming** – Client sends a stream of messages; server returns a single response. | ||
| * **Server streaming** – Client sends a single request; server returns a stream of messages. | ||
| * **Bidirectional streaming** – Both client and server send and receive streams of messages. | ||
|
|
||
| Define these in your `.proto` file using the appropriate `rpc` declarations and stream modifiers. | ||
|
|
||
| === Verify Specification Accuracy with Syntax Validation | ||
|
|
||
| Anypoint Code Builder provides syntax highlighting and validation for Protobuf 3 specifications. Validation is performed using the API Modeling Framework (AMF) parser, so you get inline feedback and error reporting as you edit your `.proto` files. Use the editor and the xref:start-open-output-panel.adoc[output panel] to track validation and scaffolding status. | ||
|
|
||
| == Generate Binary Descriptors for Implementation | ||
|
|
||
| During the design or publish process, Anypoint Code Builder generates a binary descriptor file (`.protobin`) from your Protobuf specification. With this descriptor, Mule runtime can understand the gRPC service metadata (services, methods, and message types) so you can implement and run the API. The generation typically occurs when you save, build, or publish the API spec. Don't create the `.protobin` file manually. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| == See Also | ||
|
|
||
| // TODO: Include a link to gRPC Connector docs. | ||
| * xref:start-acb.adoc[] | ||
| * xref:imp-implement-grpc-api-spec.adoc[] | ||
| * xref:des-designing-api-specs.adoc[] | ||
| * xref:des-create-api-specs.adoc[] | ||
| * xref:des-create-api-fragments.adoc[] | ||
| * xref:des-publish-grpc-api-to-exchange.adoc[] | ||
| * xref:des-publish-api-spec-to-exchange.adoc[] | ||
| * xref:start-discover-ui.adoc#use-autocomplete[Use Auto-Complete in the Editors] | ||
This file contains hidden or 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 hidden or 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 hidden or 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,71 @@ | ||
| = Publishing Your gRPC API to Exchange | ||
| :page-deployment-options: cloud-ide, desktop-ide | ||
|
|
||
| include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] | ||
|
|
||
| Publish your gRPC API specification or Protobuf library (fragment) to Anypoint Exchange so that other team members can discover, reuse, and implement it. When you publish a gRPC API project, the IDE generates the binary descriptor (`.protobin`) from your `.proto` files so that the published asset is ready for implementation and consumption. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| In Exchange, published gRPC API projects appear as assets of type *gRPC API*. Published Protobuf libraries (reusable fragments) appear as a separate asset type. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| [[prereqs]] | ||
| == Before You Begin | ||
|
|
||
| * xref:des-design-grpc-api-spec.adoc[Design a gRPC API specification] in Anypoint Code Builder, or create a Protobuf library project for reusable types and services. | ||
| * xref:start-acb.adoc[Set up and access the web or desktop IDE]. | ||
| * Have familiarity with xref:access-management::business-groups.adoc[business groups]. When you publish to Exchange from the IDE, you select or confirm the business group for the asset. | ||
|
|
||
| include::partial$acb-reusable-steps.adoc[tags="prereq-business-groups"] | ||
|
|
||
| [[publish-grpc-spec]] | ||
| == Publish a gRPC API Project to Exchange | ||
|
|
||
| To publish your gRPC API project (or Protobuf library project) to Exchange: | ||
|
|
||
| . Log in to your Anypoint Platform account. | ||
| . In *Explorer*, open your gRPC API project and click the *Publish API Project to Exchange* icon. | ||
| + | ||
| image::icon-publish-to-exchange.png["Publish API Project to Exchange icon"] | ||
| + | ||
| You can also right-click the API project in Explorer and select *API* > *Publish API Project to Exchange*. | ||
| + | ||
| Alternatively, open the xref:start-use-command-palette.adoc[Command Palette] and run: | ||
| + | ||
| [source,command] | ||
| ---- | ||
| MuleSoft: Publish API Project to Exchange | ||
| ---- | ||
| . If prompted, click *Allow* and follow the prompts to sign in to Anypoint Platform. | ||
| . Confirm or change each item in *Publish API Project to Exchange*: | ||
| * *Asset Version* – For example, `1.0.0` for a first publish. | ||
| * *API Version* – Optional for API fragments (Protobuf libraries). | ||
| * *Business Group* – The business group where the asset is published. | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
| . Optionally, expand *Project Metadata* and update asset name, tags, categories, or other metadata. Click *Apply* after making changes. | ||
| . Optionally, in the banner click *Sync centralized governance rulesets and run validation* to validate the project against applied rulesets. You must be logged in and have a business group defined in the project metadata. | ||
| + | ||
| image::des-publish-api-project.png["Publish API Project to Exchange form with banner to sync centralized rulesets"] | ||
| . Click *Publish*. | ||
| + | ||
| The IDE builds the project and generates the binary descriptor from your Protobuf specification, then publishes the asset to Exchange. When publishing is complete, you see a message that the API specification (or fragment) successfully published to Exchange. | ||
| + | ||
| If the project has validation or build errors, fix them before publishing. Check the *Problems* tab and the xref:start-open-output-panel.adoc[output panel] for details. | ||
| . Click *View Asset* to open the published asset in Exchange. | ||
| . When prompted to implement the API, choose *Yes* to scaffold the gRPC specification into a new project, or *No* to skip. See xref:imp-implement-grpc-api-spec.adoc[] for implementing a gRPC API spec. | ||
|
|
||
| [[locate-grpc-asset]] | ||
| == Locate Your gRPC API in Exchange | ||
|
|
||
| After publishing, you can find your gRPC API or Protobuf library in Anypoint Exchange: | ||
|
Crispy-Salesforce marked this conversation as resolved.
Outdated
|
||
|
|
||
| . Log in to Anypoint Platform and open Anypoint Exchange (see xref:des-publish-api-spec-to-exchange.adoc#locate-api[Locate Your API in Exchange] for links). | ||
| . Search or browse for the asset by name. gRPC API projects appear as assets of type *gRPC API*. Protobuf library projects appear under the appropriate fragment type. | ||
|
|
||
| Other developers can discover the asset, add it as a dependency for implementation, or import it as a Protobuf library into their gRPC API design projects. | ||
|
|
||
| == See Also | ||
|
|
||
| // TODO: Include a link to gRPC Connector docs. | ||
| * xref:des-design-grpc-api-spec.adoc[] | ||
| * xref:des-publish-api-spec-to-exchange.adoc[] | ||
| * xref:imp-implement-grpc-api-spec.adoc[] | ||
| * xref:des-govern-api.adoc[] | ||
| * xref:access-management::business-groups.adoc[] | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.