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
So I have my various services split up into their own yaml files and a common.yaml file they they will refer to
common.yaml
openapi: 3.0.3info:
version: "v1"title: "Common Components"description: Common Components used by many endpointspaths: {}components:
########################### Common Parameters##########################parameters:
InteractionIdParam:
in: pathname: interaction_idrequired: trueschema:
$ref: "common.yaml#/components/schemas/InteractionId"########################### Common Data Models##########################schemas:
InteractionId:
description: >- The primary Identifier for the call.type: stringformat: uuidexample: "fdb6816a-a281-412f-ae47-a40fc1033e13"
test.yaml
openapi: 3.0.3info:
version: "v1"title: "Test Service"description: The Test Servicepaths:
/v1/test/{interaction_id}/results:
get:
summary: Test Servicedescription: |- Render the test resultsparameters:
- $ref: "common.yaml#/components/parameters/InteractionIdParam"responses:
"200":
$ref: "test.yaml#/components/responses/GetTestSuccess"components:
schemas:
TestGetResponse:
type: objectproperties:
data:
type: stringresponses:
GetTestSuccess:
description: OKcontent:
application/json:
schema:
$ref: "test.yaml#/components/schemas/TestGetResponse"
so when I run gnostic --resolve-refs --grpc-out=generated/proto/ common.yaml it works fine
when I run gnostic --resolve-refs --grpc-out=generated/proto/ test.yaml I get
gnostic --resolve-refs --grpc-out=generated/proto/ openapi/test.yaml
2023/10/26 12:19:29 Not able to find parameter information for: _ref:"common.yaml#/components/parameters/InteractionIdParam"
level:WARNING code:"OPERATION" text:"One of your operations does not have an 'operationId'. gnostic-grpc might produce an incorrect output file." keys:"paths" keys:"/v1/test/{interaction_id}/results" keys:"get"
Errors reading openapi/test.yaml
Plugin error: [file "test.proto" included an unresolvable reference to "test.InteractionIdParam"]
running gnostic --resolve-refs --pb_out=generated/pb/ openapi/test.yaml works fine and when I run gnostic-grpc not as a plugin I get
gnostic-grpc -input ./generated/pb/openapi/test.pb
2023/10/26 12:25:24 Not able to find parameter information for: _ref:"common.yaml#/components/parameters/InteractionIdParam"
2023/10/26 12:25:24 Plugin error: [file "test.proto" included an unresolvable reference to "test.InteractionIdParam"]
So I have my various services split up into their own yaml files and a common.yaml file they they will refer to
common.yaml
test.yaml
so when I run
gnostic --resolve-refs --grpc-out=generated/proto/ common.yaml
it works finewhen I run
gnostic --resolve-refs --grpc-out=generated/proto/ test.yaml
I getrunning
gnostic --resolve-refs --pb_out=generated/pb/ openapi/test.yaml
works fine and when I rungnostic-grpc
not as a plugin I getwhen I run the full test.yaml file I get
The text was updated successfully, but these errors were encountered: