-
Notifications
You must be signed in to change notification settings - Fork 720
gRPC API Explorer Options
The API Explorer support for gRPC has a few options that allow you to customize the behavior. The options are minimal because the API Explorer support can technically operate without API Versioning. Most of the configuration will be performed against the versioned API Explorer, but there are a few options that are specific to gRPC.
The GrpcApiExplorerOptions have the following configuration settings:
Represents route parameter information required for API exploration.
When versioning by URL path segment, there is not a clear way to identify which segment represents the API version. Rather than use an explicit annotation, the route parameter is matched by name. The default value of the Name property is "api_version"; however, you can use whatever name you choose. The name will be matched in a case-sensitive manner.
gRPC supports route parameters in route templates, but a parameter must match an entire segment. It cannot match part of a segment in the same manner as an ASP.NET route constraint and an API version does not include literal characters such as 'v'. As a result, the character is not included in the route template.
The PrefixLiteral property adds the expected literal in the route template when it is built for the API Explorer. As an example, the gRPC route template "api/{api-version}/example" will be generated as "api/v{api-version}/example" and produce the expected behavior in the API Explorer.
- Home
- Quick Starts
- Version Format
- Version Discovery
- Version Policies
- How to Version Your Service
- API Versioning with gRPC
- API Versioning with OData
- Configuring Your Application
- Error Responses
- API Documentation
- Extensions and Customizations
- Known Limitations
- FAQ
- Examples