Skip to content

Commit cd0ad20

Browse files
update to java 25, paper 1.21.11, fix path param openapi
1 parent fcbbfef commit cd0ad20

4 files changed

Lines changed: 34 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/setup-java@v5
2020
with:
2121
distribution: adopt
22-
java-version: 21
22+
java-version: 25
2323
- name: Build with Gradle
2424
run: ./gradlew --build-cache test build
2525
- name: Publish plugin

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-java@v5
2121
with:
2222
distribution: adopt
23-
java-version: 21
23+
java-version: 25
2424
- name: Check licence
2525
run: ./gradlew spotlessCheck
2626
- name: Build with Gradle

bot/src/main/java/de/chojo/gamejam/api/v1/Users.java

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
import de.chojo.gamejam.data.access.Guilds;
1515
import io.javalin.http.Context;
1616
import io.javalin.http.HttpStatus;
17-
import io.javalin.openapi.HttpMethod;
18-
import io.javalin.openapi.OpenApi;
19-
import io.javalin.openapi.OpenApiContent;
20-
import io.javalin.openapi.OpenApiResponse;
17+
import io.javalin.openapi.*;
2118
import net.dv8tion.jda.api.entities.Guild;
2219
import net.dv8tion.jda.api.entities.Member;
2320
import net.dv8tion.jda.api.entities.User;
@@ -80,6 +77,16 @@ private <T> T completeEntity(RestAction<T> action, String entity) throws Interru
8077
@OpenApi(path = "/api/v1/users/{user-id}/{guild-id}/guild",
8178
summary = "Get the user profile of a user on a guild",
8279
methods = HttpMethod.GET,
80+
pathParams = {
81+
@OpenApiParam(
82+
name = "user-id",
83+
description = "The the user id",
84+
required = true),
85+
@OpenApiParam(
86+
name = "guild-id",
87+
description = "The the guild id",
88+
required = true)
89+
},
8390
responses = {
8491
@OpenApiResponse(status = "200", content = {@OpenApiContent(from = GuildProfile[].class)})
8592
})
@@ -92,6 +99,16 @@ private void getMutualGuilds(Context ctx) throws InterruptException {
9299

93100
@OpenApi(path = "/api/v1/users/{user-id}/{guild-id}/team",
94101
methods = HttpMethod.GET,
102+
pathParams = {
103+
@OpenApiParam(
104+
name = "user-id",
105+
description = "The the user id",
106+
required = true),
107+
@OpenApiParam(
108+
name = "guild-id",
109+
description = "The the guild id",
110+
required = true)
111+
},
95112
responses = {
96113
@OpenApiResponse(status = "200", content = {@OpenApiContent(from = TeamProfile.class)})
97114
})
@@ -111,6 +128,16 @@ private void getUserTeam(Context ctx) throws InterruptException {
111128

112129
@OpenApi(path = "/api/v1/users/{user-id}/{guild-id}/profile",
113130
methods = HttpMethod.GET,
131+
pathParams = {
132+
@OpenApiParam(
133+
name = "user-id",
134+
description = "The the user id",
135+
required = true),
136+
@OpenApiParam(
137+
name = "guild-id",
138+
description = "The the guild id",
139+
required = true)
140+
},
114141
responses = {
115142
@OpenApiResponse(status = "200", content = @OpenApiContent(from = UserProfile.class))
116143
})

plugin-paper/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tasks {
4040
}
4141

4242
runServer {
43-
minecraftVersion("1.21.1")
43+
minecraftVersion("1.21.11")
4444
}
4545
}
4646

0 commit comments

Comments
 (0)