You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #25, but in the reverse I want to be able to render to a ref:
paths:
/test:
get:
operationId: getTest
parameters:
- $ref: '#/components/parameters/test' # This here
But it seems like the only potential option is possibly resolving the ref to the full yaml currently? The problem with this is we may use the ref in many places so that could increase our Openapi file by thousands of lines.
Just for a full picture, we're doing a protobuf to openapi spec and using this library to render the openapi:
This is the rpc:
rpc GetUser(GetUserRequest) returns (User) {
option (google.api.http) = {get: "/users"};
option (google.api.method_signature) = "name";
option (gnostic.openapi.v3.operation) = {
description: "Get a user" // this will overwrite the comment above the rpc
tags: "users" // this is used to group the operations in the gnostic.openapi spec, by default it only contains the service name
operation_id: "GetUsers" // this by default is service_name + '_' + method_name
// This refers to the header defined in the document option above, it will automatically document the header when converted to gnostic.openapi/json spec
// it's currently commented out until our generation tool has support for it, once support is enabled we will uncomment this
parameters: {reference: {_ref: "#/components/parameters/filter_mask"}}"#/components/parameters/filter_mask"
};
}
We would like to render it like:
...
paths:
/users:
get:
description: Get a User
operation_id: GetUsers
parameters:
- $ref: "#/components/parameters/filter_mask"
The closest I can find is creating a proxy schema but that's only doing a ref for schemas so you'd still have lots of repeating lines.
The text was updated successfully, but these errors were encountered:
Similar to #25, but in the reverse I want to be able to render to a ref:
But it seems like the only potential option is possibly resolving the ref to the full yaml currently? The problem with this is we may use the ref in many places so that could increase our Openapi file by thousands of lines.
Just for a full picture, we're doing a protobuf to openapi spec and using this library to render the openapi:
This is the rpc:
We would like to render it like:
The closest I can find is creating a proxy schema but that's only doing a ref for schemas so you'd still have lots of repeating lines.
The text was updated successfully, but these errors were encountered: