Closed jonathanknowles closed 1 month ago
This PR removes underscores from integer literals in swagger.yaml:
swagger.yaml
- maximum: 45_000_000_000_000_000 + maximum: 45000000000000000
As part of the release process for cardano-wallet, we transform the API specification (swagger.yaml) to JSON format with the following script:
cardano-wallet
https://github.com/cardano-foundation/cardano-wallet/blob/6dc7c0389eb2866485fd0e57a33f04f9c9cd1cce/scripts/gh/update-bump.sh#L15
The above script uses the yq tool to perform this transformation.
yq
Recent versions of the yq tool fail with a ParseInt error if there are underscores within integer literals:
ParseInt
$ yq --version yq (https://github.com/mikefarah/yq/) version v4.40.5
$ yq eval specifications/api/swagger.yaml -o=json Error: json: error calling MarshalJSON for type *yqlib.CandidateNode: json: error calling MarshalJSON for type *yqlib.CandidateNode: json: error calling MarshalJSON for type *yqlib.CandidateNode: strconv.ParseInt: parsing "45_000_000_000_000_000": invalid syntax
Removing underscores prevents these errors.
https://github.com/cardano-foundation/cardano-wallet/actions/runs/9026615038/job/24804201846#step:5:9
ADP-3358
Merging by hand, as:
master
This PR removes underscores from integer literals in
swagger.yaml
:Justification
As part of the release process for
cardano-wallet
, we transform the API specification (swagger.yaml
) to JSON format with the following script:https://github.com/cardano-foundation/cardano-wallet/blob/6dc7c0389eb2866485fd0e57a33f04f9c9cd1cce/scripts/gh/update-bump.sh#L15
The above script uses the
yq
tool to perform this transformation.Recent versions of the
yq
tool fail with aParseInt
error if there are underscores within integer literals:Removing underscores prevents these errors.
Example failure
https://github.com/cardano-foundation/cardano-wallet/actions/runs/9026615038/job/24804201846#step:5:9
Issue
ADP-3358