File tree Expand file tree Collapse file tree 5 files changed +2074
-2356
lines changed Expand file tree Collapse file tree 5 files changed +2074
-2356
lines changed Original file line number Diff line number Diff line change 174
174
},
175
175
{
176
176
"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
+ }
177
186
}
178
187
]
179
- }
188
+ }
Original file line number Diff line number Diff line change 1
1
package docs
2
2
3
- import "embed"
3
+ import (
4
+ "embed"
5
+ "io/fs"
6
+ )
4
7
5
8
//go:embed swagger-ui
6
9
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
+ }
Original file line number Diff line number Diff line change 1
- <!doctype html> <!-- Important: must specify -- >
1
+ <!DOCTYPE html>
2
2
< html >
3
3
< head >
4
- < meta charset ="utf-8 "> <!-- Important: rapi-doc uses utf8 characters -->
4
+ < meta charset ="utf-8 " />
5
+ <!-- Important: rapi-doc uses utf8 characters -->
5
6
< script type ="module " src ="rapidoc-min.js "> </ script >
6
7
</ head >
7
8
< 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 >
9
11
</ body >
10
12
</ html >
You can’t perform that action at this time.
0 commit comments