diff --git a/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt b/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt index 7cd5a9d9..c5ae73da 100644 --- a/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt +++ b/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt @@ -314,9 +314,11 @@ private fun infoResponseSchema() = .description(LAPIS_DATA_VERSION_RESPONSE_DESCRIPTION) .example(LAPIS_DATA_VERSION_EXAMPLE), "requestId" to Schema().type("string").description(REQUEST_ID_HEADER_DESCRIPTION), + "requestInfo" to Schema().type("string").description(REQUEST_INFO_STRING_DESCRIPTION), + "reportTo" to Schema().type("string"), ), ) - .required(listOf("dataVersion")) + .required(listOf("reportTo")) private fun aggregatedMetadataFieldSchemas(databaseConfig: DatabaseConfig) = databaseConfig.schema.metadata.associate { it.name to Schema().type(mapToOpenApiType(it.type)) } diff --git a/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/Schemas.kt b/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/Schemas.kt index 149dc09e..99e2ca05 100644 --- a/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/Schemas.kt +++ b/lapis/src/main/kotlin/org/genspectrum/lapis/openApi/Schemas.kt @@ -82,6 +82,9 @@ A UUID that uniquely identifies the request for tracing purposes. If none if provided in the request, LAPIS will generate one. """ +const val REQUEST_INFO_STRING_DESCRIPTION = + "Some information about the request in human readable form. Intended for debugging." + const val DOWNLOAD_AS_FILE_DESCRIPTION = """ Set to true to make your browser trigger a download instead of showing the response content by setting the diff --git a/lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponse.kt b/lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponse.kt index b86e7674..249838aa 100644 --- a/lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponse.kt +++ b/lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponse.kt @@ -5,6 +5,7 @@ import org.genspectrum.lapis.openApi.LAPIS_DATA_VERSION_EXAMPLE import org.genspectrum.lapis.openApi.LAPIS_DATA_VERSION_RESPONSE_DESCRIPTION import org.genspectrum.lapis.openApi.LAPIS_INFO_DESCRIPTION import org.genspectrum.lapis.openApi.REQUEST_ID_HEADER_DESCRIPTION +import org.genspectrum.lapis.openApi.REQUEST_INFO_STRING_DESCRIPTION import org.springframework.http.ProblemDetail data class LapisResponse(val data: Data, val info: LapisInfo = LapisInfo()) @@ -28,7 +29,7 @@ data class LapisInfo( ) var requestId: String? = null, @Schema( - description = "Some information about the request in human readable form. Intended for debugging.", + description = REQUEST_INFO_STRING_DESCRIPTION, example = "my_instance on my.server.com at 2024-01-01T12:00:00.0000", ) var requestInfo: String? = null,