Skip to content


Project Dependencies

Add the following dependency to your pom.xml/build.gradle file:



To view documentation generated from your data model create an Entity which should contain @JsonUnit annotations. This model has then to be used in the controller as either request or response.

data class TelemetryRecordRequest(

    val rtt: Quantity<Time>,
    val fuel: TelemetryFuel,
    val sensors: TelemetrySensors,
    val energy: TelemetryEnergy,
    val computer: TelemetryComputer

data class TelemetryFuel(
    val nto: Quantity<Mass>,
    val hydrazine: Quantity<Mass>
Rebuild the application and check the swagger documentation generated by springdoc. This is usually located at http://localhost:8080/swagger-ui.html. The schema will now contain a description with a valid unit foreach Quantity<?> property.