feat(server/v2): add swagger server component (#23486)
This commit is contained in:
+10
-9
@@ -80,14 +80,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "./tmp-swagger-gen/cosmos/params/v1beta1/query.swagger.json",
|
||||
"operationIds": {
|
||||
"rename": {
|
||||
"Params": "Params"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "./tmp-swagger-gen/cosmos/slashing/v1beta1/query.swagger.json",
|
||||
"operationIds": {
|
||||
@@ -174,6 +166,15 @@
|
||||
},
|
||||
{
|
||||
"url": "./tmp-swagger-gen/cosmos/app/v1alpha1/query.swagger.json"
|
||||
},
|
||||
{
|
||||
"url": "./tmp-swagger-gen/cosmos/protocolpool/v1/query.swagger.json",
|
||||
"operationIds": {
|
||||
"rename": {
|
||||
"Params": "ProtocolPoolParams",
|
||||
"CommunityPool": "ProtocolPoolCommunityPool"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+14
-1
@@ -1,6 +1,19 @@
|
||||
package docs
|
||||
|
||||
import "embed"
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed swagger-ui
|
||||
var SwaggerUI embed.FS
|
||||
|
||||
// GetSwaggerFS returns the embedded Swagger UI filesystem
|
||||
func GetSwaggerFS() fs.FS {
|
||||
root, err := fs.Sub(SwaggerUI, "swagger-ui")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return root
|
||||
}
|
||||
|
||||
Vendored
+5
-3
@@ -1,10 +1,12 @@
|
||||
<!doctype html> <!-- Important: must specify -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
|
||||
<meta charset="utf-8" />
|
||||
<!-- Important: rapi-doc uses utf8 characters -->
|
||||
<script type="module" src="rapidoc-min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<rapi-doc spec-url = "swagger.yaml"> </rapi-doc>
|
||||
<rapi-doc spec-url="swagger.yaml" server-url="http://localhost:1317">
|
||||
</rapi-doc>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Vendored
+1011
-1325
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user