mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
openapi: proper typing for actuator/info
This commit is contained in:
parent
9a6b643876
commit
bf2484419d
4 changed files with 13 additions and 2 deletions
|
|
@ -186,6 +186,10 @@
|
|||
"Example": {
|
||||
"value": "{\n \"git\": {\n \"branch\": \"master\",\n \"commit\": {\n \"id\": \"9be980d\",\n \"time\": \"2025-03-12T03:40:38Z\"\n }\n },\n \"build\": {\n \"artifact\": \"komga\",\n \"name\": \"komga\",\n \"version\": \"1.21.2\",\n \"group\": \"komga\"\n },\n \"java\": {\n \"version\": \"23.0.2\",\n \"vendor\": {\n \"name\": \"Eclipse Adoptium\",\n \"version\": \"Temurin-23.0.2+7\"\n },\n \"runtime\": {\n \"name\": \"OpenJDK Runtime Environment\",\n \"version\": \"23.0.2+7\"\n },\n \"jvm\": {\n \"name\": \"OpenJDK 64-Bit Server VM\",\n \"vendor\": \"Eclipse Adoptium\",\n \"version\": \"23.0.2+7\"\n }\n },\n \"os\": {\n \"name\": \"Linux\",\n \"version\": \"6.8.0-57-generic\",\n \"arch\": \"amd64\"\n }\n}"
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import io.swagger.v3.oas.models.info.Info
|
|||
import io.swagger.v3.oas.models.info.License
|
||||
import io.swagger.v3.oas.models.media.Content
|
||||
import io.swagger.v3.oas.models.media.MediaType
|
||||
import io.swagger.v3.oas.models.media.Schema
|
||||
import io.swagger.v3.oas.models.responses.ApiResponse
|
||||
import io.swagger.v3.oas.models.responses.ApiResponses
|
||||
import io.swagger.v3.oas.models.security.SecurityRequirement
|
||||
|
|
@ -193,6 +194,10 @@ class OpenApiConfiguration(
|
|||
.addMediaType(
|
||||
"application/json",
|
||||
MediaType()
|
||||
.schema(Schema<Map<String, Any>>().apply {
|
||||
type = "object"
|
||||
additionalProperties = true
|
||||
})
|
||||
.addExamples(
|
||||
"Example",
|
||||
Example()
|
||||
|
|
|
|||
4
next-ui/src/generated/openapi/komga.d.ts
vendored
4
next-ui/src/generated/openapi/komga.d.ts
vendored
|
|
@ -4125,7 +4125,9 @@ export interface operations {
|
|||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
"application/json": {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ export const actuatorInfo = {
|
|||
}
|
||||
|
||||
export const actuatorHandlers = [
|
||||
httpTyped.get('/actuator/info', ({ response }) => response(200).json(actuatorInfo as never)),
|
||||
httpTyped.get('/actuator/info', ({ response }) => response(200).json(actuatorInfo)),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue