Skip to content

Commit

Permalink
update spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleeym committed Feb 24, 2024
1 parent 421dd9f commit 71467f7
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ paths:
example: "gameplay,enhancement"
schema:
type: string
- name: featured
in: query
description: Filter by featured mods
schema:
type: boolean
- name: sort
in: query
description: Sort by a specific enum field, in descending order. Default is "downloads"
Expand Down Expand Up @@ -198,6 +203,39 @@ paths:
parameters:
- $ref: "#/components/parameters/ModID"

put:
tags:
- mods
summary: Update a mod (admin only)
description: At the moment it's only used to set a mod to featured / not featured
security:
- bearerAuth: []

requestBody:
content:
application/json:
schema:
type: object
properties:
featured:
type: boolean
description: Whether the mod should be featured or not
example: true

parameters:
- $ref: "#/components/parameters/ModID"
responses:
"204":
description: No Content (Mod updated)
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/ForbiddenError"
"500":
$ref: "#/components/responses/InternalServerError"

/v1/mods/{id}/logo:
get:
tags:
Expand Down Expand Up @@ -519,8 +557,6 @@ components:
type: string
examples:
- Devtools
validated:
type: boolean
download_count:
type: integer
description:
Expand Down

0 comments on commit 71467f7

Please sign in to comment.