Skip to content

Commit 4ab1af5

Browse files
chore: re-gen swagger (partial backport #23486) (#23499)
Co-authored-by: Julien Robert <[email protected]>
1 parent 36e0cbe commit 4ab1af5

File tree

5 files changed

+2074
-2356
lines changed

5 files changed

+2074
-2356
lines changed

client/docs/config.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@
174174
},
175175
{
176176
"url": "./tmp-swagger-gen/cosmos/app/v1alpha1/query.swagger.json"
177+
},
178+
{
179+
"url": "./tmp-swagger-gen/cosmos/protocolpool/v1/query.swagger.json",
180+
"operationIds": {
181+
"rename": {
182+
"Params": "ProtocolPoolParams",
183+
"CommunityPool": "ProtocolPoolCommunityPool"
184+
}
185+
}
177186
}
178187
]
179-
}
188+
}

client/docs/embed.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
package docs
22

3-
import "embed"
3+
import (
4+
"embed"
5+
"io/fs"
6+
)
47

58
//go:embed swagger-ui
69
var SwaggerUI embed.FS
10+
11+
// GetSwaggerFS returns the embedded Swagger UI filesystem
12+
func GetSwaggerFS() fs.FS {
13+
root, err := fs.Sub(SwaggerUI, "swagger-ui")
14+
if err != nil {
15+
panic(err)
16+
}
17+
18+
return root
19+
}

client/docs/swagger-ui/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<!doctype html> <!-- Important: must specify -->
1+
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
4+
<meta charset="utf-8" />
5+
<!-- Important: rapi-doc uses utf8 characters -->
56
<script type="module" src="rapidoc-min.js"></script>
67
</head>
78
<body>
8-
<rapi-doc spec-url = "swagger.yaml"> </rapi-doc>
9+
<rapi-doc spec-url="swagger.yaml" server-url="http://localhost:1317">
10+
</rapi-doc>
911
</body>
1012
</html>

0 commit comments

Comments
 (0)