-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove gov v1beta1 endpoints from docs (#3589)
* chore: remove gov v1beta1 endpoints from docs * also restore missing upgrade module * set deprecated option * Add deprecated options and fully qualified naming
- Loading branch information
Showing
8 changed files
with
5,190 additions
and
6,467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
go install github.com/grpc-ecosystem/grpc-gateway/v2/[email protected] | ||
set -eo pipefail | ||
|
||
go install github.com/grpc-ecosystem/grpc-gateway/v2/[email protected] | ||
|
||
go mod download | ||
|
||
|
@@ -54,12 +56,19 @@ keys=$(yq e '.paths | keys' $OUTPUT_DIR/$MERGED_SWAGGER_FILE) | |
for key in $keys; do | ||
# Check if key starts with '/cosmos/NAME' | ||
if [[ $key == "/cosmos/"* ]]; then | ||
# Exclude paths starting with /cosmos/gov/v1beta1 | ||
# these endpoints are broken post v0.47 upgrade | ||
if [[ $key == "/cosmos/gov/v1beta1"* ]]; then | ||
yq e "del(.paths.\"$key\")" -i $OUTPUT_DIR/$MERGED_SWAGGER_FILE | ||
continue | ||
fi | ||
|
||
# Extract NAME | ||
name=$(echo $key | cut -d '/' -f 3) | ||
# Check if the standard module is not imported in the app.go | ||
if ! grep -q "github.com/cosmos/cosmos-sdk/x/$name" $APP_GO; then | ||
# Keep the standard "base" and "tx" endpoints | ||
if [[ $name == "base" || $name == "tx" ]]; then | ||
# Keep the standard "base", "tx", and "upgrade" endpoints | ||
if [[ $name == "base" || $name == "tx" || $name == "upgrade" ]]; then | ||
continue | ||
fi | ||
# If not found, delete the key from the YAML file in-place | ||
|
Oops, something went wrong.