feat(client/v2): marshal enum as string (#19653)

This commit is contained in:
Julien Robert 2024-03-06 15:33:20 +01:00 committed by GitHub
parent 09a49fe260
commit 2abd2ec8a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -36,12 +36,13 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## [v2.0.0-beta.2] - 2023-02-19
## [v2.0.0-beta.2] - 2024-XX-XX
### Improvements
* [#19618](https://github.com/cosmos/cosmos-sdk/pull/19618) Marshal enum as string in queries.
* [#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Use client context from root (or enhanced) command in autocli commands.
* Note, the given command must have a `client.Context` in its context.
* Note, the given command must have a `client.Context` in its context.
* [#19216](https://github.com/cosmos/cosmos-sdk/pull/19216) Do not overwrite TxConfig, use directly the one provided in context. TxConfig should always be set in the `client.Context` in `root.go` of an app.
### Bug Fixes

View File

@ -111,6 +111,7 @@ func (b *Builder) BuildQueryMethodCommand(ctx context.Context, descriptor protor
outputType := util.ResolveMessageType(b.TypeResolver, descriptor.Output())
encoderOptions := aminojson.EncoderOptions{
Indent: " ",
EnumAsString: true,
DoNotSortFields: true,
TypeResolver: b.TypeResolver,
FileResolver: b.FileResolver,