diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/routes/swagger/BookingSwagger.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/routes/swagger/BookingSwagger.kt index a5b37d7272eaab59055ae223505a6bccac55b87f..fac4b7190b61332cf94cb75fe3a9980ba1902091 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/routes/swagger/BookingSwagger.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/routes/swagger/BookingSwagger.kt @@ -172,7 +172,7 @@ fun SwaggerDocument.deleteBookingById(): OpenApiRoute.() -> Unit = { description = "Deletes a booking with the given id. If the booking is not found in the database it is silently ignored" tags = listOf("bookings") request { - queryParameter("id") { + pathParameter("id") { description = "Booking id" example = "c48c2a3d-bbfd-4801-b121-973ae3cf4cd9" required = true diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/service/BookingService.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/service/BookingService.kt index d9d41ff57f618dba2db9cd0aca10364239015d7a..aeebc99c11052a20a09effaeddc818646cb888f4 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/service/BookingService.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/service/BookingService.kt @@ -97,6 +97,7 @@ class BookingService( else -> bookingRepository.findAll() } + if (bookingList.isEmpty()) return bookingList return findIntegrationsAndUtilities(bookingList) } diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/user/routes/swagger/UserSwagger.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/user/routes/swagger/UserSwagger.kt index 79c0cdfaf276d280d49b26d8b79f18f258a6a0ae..d4eb7206f51c8edc41d6d22ae8b360d28d7230b2 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/user/routes/swagger/UserSwagger.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/user/routes/swagger/UserSwagger.kt @@ -153,7 +153,14 @@ fun SwaggerDocument.updateUser(): OpenApiRoute.() -> Unit = { description = "Changes user by id" tags = listOf("users") request { + pathParameter("user_id") { + description = "User id" + example = "87e66ee0-2550-4188-8d79-75560125836a" + required = true + allowEmptyValue = false + } body { + required = true example( "User", UserDTO( diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/repository/WorkspaceRepository.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/repository/WorkspaceRepository.kt index c77ed40756d93bf59391ddf7bfc22e3b72683a78..dfe4beb148f2c1eae1886c81762e423ea23a3ab0 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/repository/WorkspaceRepository.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/repository/WorkspaceRepository.kt @@ -2,7 +2,6 @@ package office.effective.features.workspace.repository import office.effective.common.exception.InstanceNotFoundException import office.effective.features.booking.repository.WorkspaceBooking -import office.effective.features.user.repository.UserEntity import office.effective.features.workspace.converters.WorkspaceRepositoryConverter import office.effective.model.Utility import office.effective.model.Workspace diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/WorkspaceRouting.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/WorkspaceRouting.kt index e0e0b3815f6c644b500988aee7639fe7ee3b3e81..f9be129a19a211cdf85cbaf4859edd1a1a71d2e3 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/WorkspaceRouting.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/WorkspaceRouting.kt @@ -22,7 +22,7 @@ fun Route.workspaceRouting() { call.respond(facade.findById(id)) } get(SwaggerDocument.returnWorkspaceByTag()) { - val tag: String = call.request.queryParameters["tag"] + val tag: String = call.request.queryParameters["workspace_tag"] ?: return@get call.respond(HttpStatusCode.BadRequest) val freeFrom: String? = call.request.queryParameters["free_from"] diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/swagger/WorkspaceSwagger.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/swagger/WorkspaceSwagger.kt index 10fca709e0a8fc526aeb84034f64cc91c564f38c..4f0a9f0a59ee4e7c224acae21f1811c751d08a8e 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/swagger/WorkspaceSwagger.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/workspace/routes/swagger/WorkspaceSwagger.kt @@ -54,7 +54,7 @@ fun SwaggerDocument.returnWorkspaceByTag(): OpenApiRoute.() -> Unit = { description = "Return all workspaces by tag" tags = listOf("workspaces") request { - queryParameter("tag") { + queryParameter("workspace_tag") { description = "Workspace tag" example = "meeting" required = true