Skip to content

Commit 4f8f304

Browse files
committed
feat: add resourcepacks to openapi
1 parent 1d22d00 commit 4f8f304

File tree

4 files changed

+42
-5
lines changed

4 files changed

+42
-5
lines changed

docs/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/swagger.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/swagger.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,23 @@ components:
11921192
rankText:
11931193
type: string
11941194
type: object
1195+
models.ResourcePackConfig:
1196+
properties:
1197+
author:
1198+
type: string
1199+
disabled:
1200+
type: boolean
1201+
icon:
1202+
type: string
1203+
id:
1204+
type: string
1205+
name:
1206+
type: string
1207+
url:
1208+
type: string
1209+
version:
1210+
type: string
1211+
type: object
11951212
models.RiftCastleOutput:
11961213
properties:
11971214
grubberStacks:
@@ -2583,6 +2600,26 @@ paths:
25832600
summary: Render and return a potion image
25842601
tags:
25852602
- potion
2603+
/api/resourcepacks/{uuid}/{profileId}:
2604+
get:
2605+
description: Returns a list of resource packs
2606+
requestBody:
2607+
content:
2608+
application/json:
2609+
schema:
2610+
type: object
2611+
responses:
2612+
"200":
2613+
content:
2614+
application/json:
2615+
schema:
2616+
items:
2617+
$ref: '#/components/schemas/models.ResourcePackConfig'
2618+
type: array
2619+
description: OK
2620+
summary: Get list of resource packs
2621+
tags:
2622+
- resourcepacks
25862623
/api/rift/{uuid}/{profileId}:
25872624
get:
25882625
description: Returns rift data for the given user and profile ID

src/routes/resourcepacks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var RESOURCE_PACKS = []models.ResourcePackConfig{}
1818
// @Tags resourcepacks
1919
// @Accept json
2020
// @Produce json
21-
// @Success 200 {object} []ResourcePackConfig
21+
// @Success 200 {object} []models.ResourcePackConfig
2222
// @Router /api/resourcepacks/{uuid}/{profileId} [get]
2323
func ResourcePackHandler(c *fiber.Ctx) error {
2424
timeNow := time.Now()

0 commit comments

Comments
 (0)