Closed jcompagni10 closed 1 year ago
I was not able to replicate the issue.
The field reverse
comes from the PageRequest
message type defined in cosmos/base/query/v1beta1/pagination.proto and it should be available when the type is used within a protobuf message definition, for example:
import "cosmos/base/query/v1beta1/pagination.proto";
service Query {
rpc Params(QueryCustomRequest) returns (QueryCustomResponse) {
option (google.api.http).get = "/demo/demo/custom";
}
}
message QueryCustomRequest {
// This should result in a "pagination.reverse" field
// when Cosmos SDK >= v0.43 is used
cosmos.base.query.v1beta1.PageRequest pagination = 1; // <--
}
message QueryCustomResponse {
string foo = 1;
cosmos.base.query.v1beta1.PageResponse pagination = 2; // <--
}
Adding the PageRequest
should result in protoc_gen_openapiv2
generating the corresponding OpenAPI definition for the query parameters used for paging.
@jcompagni10 maybe you can try to run the generation using the clear cache flag:
ignite generate openapi --clear-cache
Hi @jeronimoalbi, --clear-cache
does not improve the issue unfortunately. Since this behavior is non-deterministic across several developers at Duality we feel confident it's a real issue. Try checking out revision 86369dc12bd687d5878c9a3cf693605bcc6cadc4
from https://github.com/duality-labs/duality, running ignite generate openapi
(either with or without --clear-cache
), and commiting the changes before repeating again.
This change has forced us to manually decide when to update update the openapi.yml since, it's difficult to ascertain programmatically when it's out of date.
@teddyknox, which ignite and os version are you using?
can you run ignite version
?
Describe the bug When running
ignite generate openapi
the resulting openapi.yml sometimes removes the pagination.reverse field from some queriesThis error seems to be very unpredictable. Sometimes the pagination.reverse field is included, and sometimes it's removed. I cannot find any way to consistently replicate the bug.
To reproduce Steps to reproduce the behavior:
ignite generate openapi
What version are you using? Error has occurred on both v0.23.0 and v0.25.2
go.mod