Skip to content

Commit

Permalink
fix(api): Fix list users query response
Browse files Browse the repository at this point in the history
The response of the query was missing the response type in apiDocs, and
as a consequence, User type was not created to the API query client in
the UI.

Signed-off-by: Jyrki Keisala <[email protected]>
  • Loading branch information
Etsija committed Oct 23, 2024
1 parent e706ea7 commit d407306
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions core/src/main/kotlin/apiDocs/AdminDocs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import io.github.smiley4.ktorswaggerui.dsl.routes.OpenApiRoute
import io.ktor.http.HttpStatusCode

import org.eclipse.apoapsis.ortserver.api.v1.model.CreateUser
import org.eclipse.apoapsis.ortserver.api.v1.model.User

val runPermissionsSync: OpenApiRoute.() -> Unit = {
operationId = "runPermissionsSync"
Expand Down Expand Up @@ -55,6 +56,24 @@ val getUsers: OpenApiRoute.() -> Unit = {
response {
HttpStatusCode.OK to {
description = "Successfully retrieved the users."
jsonBody<List<User>> {
example("Get all users of the server") {
value = listOf(
User(
username = "user1",
firstName = "First1",
lastName = "Last1",
email = "[email protected]"
),
User(
username = "user2",
firstName = "First2",
lastName = "Last2",
email = "[email protected]"
)
)
}
}
}
}
}
Expand Down

0 comments on commit d407306

Please sign in to comment.