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
I'm trying with gnostic-grpc to convert a yaml file to proto file. I tried with my own sample obtained the above error. So i tried with the bookstore.yaml file.
level:INFO code:"DOCUMENTFIELDS" text:"Field: 'servers' is not supported for the OpenAPI document with title: Bookstore" keys:"servers"
level:INFO code:"DOCUMENTFIELDS" text:"Field: 'security' is not supported for the OpenAPI document with title: Bookstore" keys:"security"
level:INFO code:"COMPONENTSFIELDS" text:"Field: 'securitySchemes' is not supported for the component" keys:"components" keys:"securitySchemes"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'required' is not supported for the schema: book" keys:"components" keys:"schemas" keys:"book" keys:"required"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'required' is not supported for the schema: listBooksResponse" keys:"components" keys:"schemas" keys:"listBooksResponse" keys:"required"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'required' is not supported for the schema: shelf" keys:"components" keys:"schemas" keys:"shelf" keys:"required"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'required' is not supported for the schema: error" keys:"components" keys:"schemas" keys:"error" keys:"required"
level:INFO code:"REQUESTBODYFIELDS" text:"Field: 'required' is not supported for the request: createShelf" keys:"paths" keys:"/shelves" keys:"post" keys:"requestBody" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}" keys:"get" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}" keys:"delete" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}/books" keys:"get" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}/books" keys:"post" keys:"parameters" keys:"required"
level:INFO code:"REQUESTBODYFIELDS" text:"Field: 'required' is not supported for the request: createBook" keys:"paths" keys:"/shelves/{shelf}/books" keys:"post" keys:"requestBody" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}/books/{book}" keys:"get" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: book" keys:"paths" keys:"/shelves/{shelf}/books/{book}" keys:"get" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: shelf" keys:"paths" keys:"/shelves/{shelf}/books/{book}" keys:"delete" keys:"parameters" keys:"required"
level:INFO code:"PARAMETERFIELDS" text:"Field: 'required' is not supported for parameter: book" keys:"paths" keys:"/shelves/{shelf}/books/{book}" keys:"delete" keys:"parameters" keys:"required"
Errors reading /Users/piraveena/Documents/test/swagger.yaml
Plugin error: [cycle in imports: swagger.proto -> swagger.proto]%
Go version: go version go1.19 darwin/amd64
And I'm using latest gnostic-grpc
Any idea why I'm getting above errors
The text was updated successfully, but these errors were encountered:
The easiest way to fix it is specifying a relative path to OpenAPI contract instead an abosule path.
Other possible solution:
The issue is most probably on gnostic side. Particularly, function isSymbolicReference works wrong if an absolute path specified.
One can try to add condition "if sourceName and ref are not the same file" in the if-statement.
It will break support of OpenAPI contracts distributed among multiple files. For example, other.yaml test will fail
I'm trying with gnostic-grpc to convert a yaml file to proto file. I tried with my own sample obtained the above error. So i tried with the bookstore.yaml file.
Command
./gnostic --grpc-out=service /Users/piraveena/Documents/test/swagger.yaml
Error logs
Go version:
go version go1.19 darwin/amd64
And I'm using latest gnostic-grpc
Any idea why I'm getting above errors
The text was updated successfully, but these errors were encountered: