swagger
This commit is contained in:
parent
3d92f0b8b4
commit
acf0953324
10
Makefile
10
Makefile
@ -3,14 +3,14 @@
|
|||||||
build: clean
|
build: clean
|
||||||
bee pack
|
bee pack
|
||||||
|
|
||||||
base:
|
|
||||||
docker compose -f docker-compose.base.yml up -d
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
bee run -gendoc=true -downdoc=true
|
bee run -gendoc=true -downdoc=true
|
||||||
|
|
||||||
|
purge:
|
||||||
|
lsof -t -i:8087 | xargs kill | true
|
||||||
|
|
||||||
run-dev:
|
run-dev:
|
||||||
bee generate routers && HTTPPORT=8087 bee run -gendoc=true -downdoc=true
|
bee generate routers && bee run -gendoc=true -downdoc=true
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
bee run -downdebug -gendebug
|
bee run -downdebug -gendebug
|
||||||
@ -30,6 +30,6 @@ publish-registry:
|
|||||||
|
|
||||||
all: docker publish-kind publish-registry
|
all: docker publish-kind publish-registry
|
||||||
|
|
||||||
dev: base run-dev
|
dev: purge run-dev
|
||||||
|
|
||||||
.PHONY: build run clean docker publish-kind publish-registry
|
.PHONY: build run clean docker publish-kind publish-registry
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"port": 8080,
|
"port": 8087,
|
||||||
"MONGO_URL":"mongodb://localhost:27017/",
|
"MONGO_URL":"mongodb://localhost:27017/",
|
||||||
"MONGO_DATABASE":"DC_myDC"
|
"MONGO_DATABASE":"DC_myDC"
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
appname = oc-catalog
|
appname = oc-catalog
|
||||||
httpport = 8080
|
httpport = 8087
|
||||||
runmode = dev
|
runmode = dev
|
||||||
autorender = false
|
autorender = false
|
||||||
copyrequestbody = true
|
copyrequestbody = true
|
||||||
|
@ -15,7 +15,10 @@ type VersionController struct {
|
|||||||
// @Success 200
|
// @Success 200
|
||||||
// @router / [get]
|
// @router / [get]
|
||||||
func (c *VersionController) GetAll() {
|
func (c *VersionController) GetAll() {
|
||||||
c.Data["json"] = map[string]string{"version": "1"}
|
c.Data["json"] = map[string]string{
|
||||||
|
"service": "oc-catalog",
|
||||||
|
"version": "1",
|
||||||
|
}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ services:
|
|||||||
- 8087:8080
|
- 8087:8080
|
||||||
container_name: oc-catalog
|
container_name: oc-catalog
|
||||||
networks:
|
networks:
|
||||||
- catalog
|
- oc
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.catalog.entrypoints=web"
|
- "traefik.http.routers.catalog.entrypoints=web"
|
||||||
@ -20,5 +20,5 @@ services:
|
|||||||
- "traefik.http.services.catalog.loadbalancer.server.port=8080"
|
- "traefik.http.services.catalog.loadbalancer.server.port=8080"
|
||||||
- "traefik.http.middlewares.catalog.forwardauth.address=http://oc-auth:8080/oc/forward"
|
- "traefik.http.middlewares.catalog.forwardauth.address=http://oc-auth:8080/oc/forward"
|
||||||
networks:
|
networks:
|
||||||
catalog:
|
oc:
|
||||||
external: true
|
external: true
|
BIN
oc-catalog
Executable file
BIN
oc-catalog
Executable file
Binary file not shown.
0
swagger/favicon-16x16.png
Executable file → Normal file
0
swagger/favicon-16x16.png
Executable file → Normal file
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B |
0
swagger/favicon-32x32.png
Executable file → Normal file
0
swagger/favicon-32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
2
swagger/index.html
Executable file → Normal file
2
swagger/index.html
Executable file → Normal file
@ -39,7 +39,7 @@
|
|||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
// Begin Swagger UI call region
|
// Begin Swagger UI call region
|
||||||
const ui = SwaggerUIBundle({
|
const ui = SwaggerUIBundle({
|
||||||
url: "swagger.json",
|
url: "https://petstore.swagger.io/v2/swagger.json",
|
||||||
dom_id: '#swagger-ui',
|
dom_id: '#swagger-ui',
|
||||||
deepLinking: true,
|
deepLinking: true,
|
||||||
presets: [
|
presets: [
|
||||||
|
0
swagger/oauth2-redirect.html
Executable file → Normal file
0
swagger/oauth2-redirect.html
Executable file → Normal file
0
swagger/swagger-ui-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-bundle.js.map
Executable file → Normal file
0
swagger/swagger-ui-bundle.js.map
Executable file → Normal file
0
swagger/swagger-ui-es-bundle-core.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle-core.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-es-bundle.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js.map
Executable file → Normal file
0
swagger/swagger-ui-standalone-preset.js.map
Executable file → Normal file
0
swagger/swagger-ui.css
Executable file → Normal file
0
swagger/swagger-ui.css
Executable file → Normal file
0
swagger/swagger-ui.css.map
Executable file → Normal file
0
swagger/swagger-ui.css.map
Executable file → Normal file
0
swagger/swagger-ui.js
Executable file → Normal file
0
swagger/swagger-ui.js
Executable file → Normal file
0
swagger/swagger-ui.js.map
Executable file → Normal file
0
swagger/swagger-ui.js.map
Executable file → Normal file
0
swagger/swagger.json
Executable file → Normal file
0
swagger/swagger.json
Executable file → Normal file
0
swagger/swagger.yml
Executable file → Normal file
0
swagger/swagger.yml
Executable file → Normal file
Loading…
Reference in New Issue
Block a user