-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add OpenApiStatisticsController
- Loading branch information
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
.../informatievlaanderen/ldes/server/admin/rest/controllers/OpenApiStatisticsController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package be.vlaanderen.informatievlaanderen.ldes.server.admin.rest.controllers; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.ExampleObject; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
|
||
@SuppressWarnings("java:S2479") // whitespace needed for examples | ||
@Tag(name = "Statistics") | ||
public interface OpenApiStatisticsController { | ||
|
||
@Operation(summary = "Retrieve json with statistics of the LDES server") | ||
@ApiResponse(responseCode = "200", content = { | ||
@Content(mediaType = "application/json", schema = @Schema(implementation = String.class), examples = @ExampleObject(value = """ | ||
{ | ||
"ingested member count": 4018, | ||
"current member count": 4018, | ||
"LDESes": [ | ||
{ | ||
"name": "mobility-hindrances", | ||
"ingested member count": 4018, | ||
"current member count": 4018, | ||
"views": [ | ||
{ | ||
"name": "mobility-hindrances/timebased", | ||
"fragmentations": [ | ||
{ | ||
"name": "HierarchicalTimeBasedFragmentation", | ||
"properties": { | ||
"maxGranularity": "minute", | ||
"fragmentationPath": "http://www.w3.org/ns/prov#generatedAtTime" | ||
} | ||
} | ||
], | ||
"fragmentation progress": 100 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
""")), | ||
}) | ||
String getStatistics(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters