diff --git a/client/src/shared/instrument-card-actions/ui/Favorite.button.tsx b/client/src/shared/instrument-card-actions/ui/Favorite.button.tsx index 137d5f55..546921c1 100644 --- a/client/src/shared/instrument-card-actions/ui/Favorite.button.tsx +++ b/client/src/shared/instrument-card-actions/ui/Favorite.button.tsx @@ -10,10 +10,7 @@ import { InstrumentId } from "generated/model"; import Jwt from "domain/model/jwt"; import { apiConfig } from "shared/config/api"; import { useTranslation } from "react-i18next"; -import { - I18N_HEADER_FAVORITE_BUTTON, - -} from "../../../i18n"; +import { I18N_HEADER_FAVORITE_BUTTON } from "../../../i18n"; interface Props { instrumentId: InstrumentId; diff --git a/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx b/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx index fb20f540..57d3dcb8 100644 --- a/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx +++ b/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx @@ -6,9 +6,7 @@ import { useDarkMode } from "shared/dark-mode/use-dark-mode"; import { apiConfig } from "shared/config/api"; import Jwt from "domain/model/jwt"; import { DeleteInstrumentByIdApi } from "generated/api/delete-instrument-by-id-api"; -import { - I18N_INSTRUMENT_CARD_REMOVE_BUTTON, -} from "../../../i18n"; +import { I18N_INSTRUMENT_CARD_REMOVE_BUTTON } from "../../../i18n"; import { useTranslation } from "react-i18next"; interface Props { diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/AddFavoriteApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/AddFavoriteApi.kt new file mode 100644 index 00000000..4322f006 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/AddFavoriteApi.kt @@ -0,0 +1,45 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.InstrumentId +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface AddFavoriteApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/favorite/add"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun addFavorite( @Valid @RequestBody instrumentId: InstrumentId): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ApiUtil.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ApiUtil.kt new file mode 100644 index 00000000..f288b748 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ApiUtil.kt @@ -0,0 +1,19 @@ +package mu.muse.rest.api + +import org.springframework.web.context.request.NativeWebRequest + +import jakarta.servlet.http.HttpServletResponse +import java.io.IOException + +object ApiUtil { + fun setExampleResponse(req: NativeWebRequest, contentType: String, example: String) { + try { + val res = req.getNativeResponse(HttpServletResponse::class.java) + res?.characterEncoding = "UTF-8" + res?.addHeader("Content-Type", contentType) + res?.writer?.print(example) + } catch (e: IOException) { + throw RuntimeException(e) + } + } +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/BasicLoginApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/BasicLoginApi.kt new file mode 100644 index 00000000..277c8a33 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/BasicLoginApi.kt @@ -0,0 +1,45 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.JwtResponse +import mu.muse.rest.dto.ServerError +import mu.muse.rest.dto.UsernameAndPasswordRequestBody +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface BasicLoginApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/auth/login"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun basicLogin( @Valid @RequestBody usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/CreateInstrumentApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/CreateInstrumentApi.kt new file mode 100644 index 00000000..c1b4ec6e --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/CreateInstrumentApi.kt @@ -0,0 +1,45 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.CreateInstrumentRequestBody +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface CreateInstrumentApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/instrument/create"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun createInstrument( @Valid @RequestBody createInstrumentRequestBody: CreateInstrumentRequestBody): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/DeleteInstrumentByIdApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/DeleteInstrumentByIdApi.kt new file mode 100644 index 00000000..40a18bad --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/DeleteInstrumentByIdApi.kt @@ -0,0 +1,43 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface DeleteInstrumentByIdApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/instrument/{instrumentId}/delete"], + produces = ["application/json"] + ) + fun deleteInstrumentById( @PathVariable("instrumentId") instrumentId: kotlin.Long): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/EditInstrumentApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/EditInstrumentApi.kt new file mode 100644 index 00000000..4b3c2687 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/EditInstrumentApi.kt @@ -0,0 +1,45 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.EditInstrumentRequestBody +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface EditInstrumentApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/instrument/edit"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun editInstrument( @Valid @RequestBody editInstrumentRequestBody: EditInstrumentRequestBody): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetCountriesApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetCountriesApi.kt new file mode 100644 index 00000000..d1ca6fc5 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetCountriesApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetCountriesResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetCountriesApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/countries"], + produces = ["application/json"] + ) + fun getCountries(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentBasicMaterialsApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentBasicMaterialsApi.kt new file mode 100644 index 00000000..26c6970b --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentBasicMaterialsApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetInstrumentBasicMaterialsResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentBasicMaterialsApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/instrument/materials"], + produces = ["application/json"] + ) + fun getInstrumentBasicMaterials(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentByIdApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentByIdApi.kt new file mode 100644 index 00000000..23bc016d --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentByIdApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.InstrumentDetail +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentByIdApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/instrument/{instrumentId}"], + produces = ["application/json"] + ) + fun getInstrumentById( @PathVariable("instrumentId") instrumentId: kotlin.Long): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentPhotoApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentPhotoApi.kt new file mode 100644 index 00000000..7a8d3c61 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentPhotoApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.InstrumentPhoto +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentPhotoApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/instrument/photo/{instrumentId}"], + produces = ["image/*", "application/json"] + ) + fun getInstrumentPhoto( @PathVariable("instrumentId") instrumentId: kotlin.Long): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentTypesApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentTypesApi.kt new file mode 100644 index 00000000..a0ce59b8 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentTypesApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetInstrumentTypesResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentTypesApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/instrument/types"], + produces = ["application/json"] + ) + fun getInstrumentTypes(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaApi.kt new file mode 100644 index 00000000..f18fe70e --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaApi.kt @@ -0,0 +1,46 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetInstrumentsByCriteriaRequestBody +import mu.muse.rest.dto.GetInstrumentsByCriteriaResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentsByCriteriaApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/instruments"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun getInstrumentsByCriteria( @Valid @RequestBody getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaPaginatedApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaPaginatedApi.kt new file mode 100644 index 00000000..9b1130c5 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetInstrumentsByCriteriaPaginatedApi.kt @@ -0,0 +1,46 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetInstrumentByCriteriaPageResponse +import mu.muse.rest.dto.GetInstrumentsByCriteriaRequestBody +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetInstrumentsByCriteriaPaginatedApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/instruments/paginated"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun getInstrumentsByCriteriaPaginated(@NotNull @Valid @RequestParam(value = "page_size", required = true) pageSize: kotlin.Int,@NotNull @Valid @RequestParam(value = "page_number", required = true) pageNumber: kotlin.Int, @Valid @RequestBody getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetManufacturersApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetManufacturersApi.kt new file mode 100644 index 00000000..871fce63 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetManufacturersApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.GetManufacturersResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetManufacturersApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/manufacturer"], + produces = ["application/json"] + ) + fun getManufacturers(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetUserProfileApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetUserProfileApi.kt new file mode 100644 index 00000000..b676cb06 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/GetUserProfileApi.kt @@ -0,0 +1,43 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ProfileDetails +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface GetUserProfileApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/profile"], + produces = ["application/json"] + ) + fun getProfile(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ListFavoriteApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ListFavoriteApi.kt new file mode 100644 index 00000000..de90f7e7 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/ListFavoriteApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.ListFavoriteResponse +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface ListFavoriteApi { + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/favorite/list"], + produces = ["application/json"] + ) + fun listFavorite(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/LogoutApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/LogoutApi.kt new file mode 100644 index 00000000..4a9ce587 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/LogoutApi.kt @@ -0,0 +1,42 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface LogoutApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/auth/logout"], + produces = ["application/json"] + ) + fun logout(): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/RemoveFavoriteApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/RemoveFavoriteApi.kt new file mode 100644 index 00000000..5163e2f7 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/RemoveFavoriteApi.kt @@ -0,0 +1,45 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.ClientError +import mu.muse.rest.dto.InstrumentId +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface RemoveFavoriteApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/favorite/remove"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun removeFavorite( @Valid @RequestBody instrumentId: InstrumentId): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/UserRegistrationApi.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/UserRegistrationApi.kt new file mode 100644 index 00000000..a7e9d16a --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/api/UserRegistrationApi.kt @@ -0,0 +1,44 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.8.0). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package mu.muse.rest.api + +import mu.muse.rest.dto.RegistrationRequest +import mu.muse.rest.dto.ServerError +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.* +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +interface UserRegistrationApi { + + + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/registration"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun userRegistration( @Valid @RequestBody registrationRequest: RegistrationRequest): ResponseEntity +} diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/BasicMaterial.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/BasicMaterial.kt new file mode 100644 index 00000000..606e7f45 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/BasicMaterial.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param i18nCode + * @param localizedText + */ +data class BasicMaterial( + + @get:JsonProperty("i18n_code", required = true) val i18nCode: kotlin.String, + + @get:JsonProperty("localized_text") val localizedText: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ClientError.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ClientError.kt new file mode 100644 index 00000000..bc2f0e86 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ClientError.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param message Error description + * @param cause Exception stack trace + */ +data class ClientError( + + @get:JsonProperty("message", required = true) val message: kotlin.String, + + @get:JsonProperty("cause") val cause: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/Country.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/Country.kt new file mode 100644 index 00000000..0021f428 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/Country.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param i18nCode + * @param localizedText + */ +data class Country( + + @get:JsonProperty("i18n_code", required = true) val i18nCode: kotlin.String, + + @get:JsonProperty("localized_text") val localizedText: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/CreateInstrumentRequestBody.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/CreateInstrumentRequestBody.kt new file mode 100644 index 00000000..2ac68b03 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/CreateInstrumentRequestBody.kt @@ -0,0 +1,32 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentDetailWithoutId +import mu.muse.rest.dto.InstrumentPhoto +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentDetail + * @param instrumentPhoto + */ +data class CreateInstrumentRequestBody( + + @field:Valid + @get:JsonProperty("instrument_detail", required = true) val instrumentDetail: InstrumentDetailWithoutId, + + @field:Valid + @get:JsonProperty("instrument_photo", required = true) val instrumentPhoto: InstrumentPhoto + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/EditInstrumentRequestBody.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/EditInstrumentRequestBody.kt new file mode 100644 index 00000000..c767b3d7 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/EditInstrumentRequestBody.kt @@ -0,0 +1,32 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentDetail +import mu.muse.rest.dto.InstrumentPhoto +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentDetail + * @param instrumentPhoto + */ +data class EditInstrumentRequestBody( + + @field:Valid + @get:JsonProperty("instrument_detail", required = true) val instrumentDetail: InstrumentDetail, + + @field:Valid + @get:JsonProperty("instrument_photo", required = true) val instrumentPhoto: InstrumentPhoto + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetCountriesResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetCountriesResponse.kt new file mode 100644 index 00000000..a93f13ae --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetCountriesResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.Country +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class GetCountriesResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentBasicMaterialsResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentBasicMaterialsResponse.kt new file mode 100644 index 00000000..a4614262 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentBasicMaterialsResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.BasicMaterial +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class GetInstrumentBasicMaterialsResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentByCriteriaPageResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentByCriteriaPageResponse.kt new file mode 100644 index 00000000..06b24f4d --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentByCriteriaPageResponse.kt @@ -0,0 +1,42 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentDetail +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + * @param contentSize The number of items in the content. + * @param pageSize The number of items per page. + * @param pageNumber The current page number (0-based index). + * @param totalElements The total number of elements across all pages. + * @param totalPages The total number of pages. + */ +data class GetInstrumentByCriteriaPageResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List, + + @get:JsonProperty("content_size", required = true) val contentSize: kotlin.Long, + + @get:JsonProperty("page_size", required = true) val pageSize: kotlin.Long, + + @get:JsonProperty("page_number", required = true) val pageNumber: kotlin.Long, + + @get:JsonProperty("total_elements", required = true) val totalElements: kotlin.Long, + + @get:JsonProperty("total_pages", required = true) val totalPages: kotlin.Long + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentTypesResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentTypesResponse.kt new file mode 100644 index 00000000..2cb9b5d2 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentTypesResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentType +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class GetInstrumentTypesResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaRequestBody.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaRequestBody.kt new file mode 100644 index 00000000..77788d6e --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaRequestBody.kt @@ -0,0 +1,70 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.BasicMaterial +import mu.muse.rest.dto.Country +import mu.muse.rest.dto.InstrumentId +import mu.muse.rest.dto.InstrumentName +import mu.muse.rest.dto.InstrumentType +import mu.muse.rest.dto.ManufactureDate +import mu.muse.rest.dto.ManufactureType +import mu.muse.rest.dto.ReleaseDate +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentName + * @param instrumentTypes + * @param manufacturerTypes + * @param manufactureDateFrom + * @param manufactureDateTo + * @param releaseDateFrom + * @param releaseDateTo + * @param countries + * @param materials + * @param instrumentIds + */ +data class GetInstrumentsByCriteriaRequestBody( + + @field:Valid + @get:JsonProperty("instrument_name") val instrumentName: InstrumentName? = null, + + @field:Valid + @get:JsonProperty("instrument_types") val instrumentTypes: kotlin.collections.List? = null, + + @field:Valid + @get:JsonProperty("manufacturer_types") val manufacturerTypes: kotlin.collections.List? = null, + + @field:Valid + @get:JsonProperty("manufacture_date_from") val manufactureDateFrom: ManufactureDate? = null, + + @field:Valid + @get:JsonProperty("manufacture_date_to") val manufactureDateTo: ManufactureDate? = null, + + @field:Valid + @get:JsonProperty("release_date_from") val releaseDateFrom: ReleaseDate? = null, + + @field:Valid + @get:JsonProperty("release_date_to") val releaseDateTo: ReleaseDate? = null, + + @field:Valid + @get:JsonProperty("countries") val countries: kotlin.collections.List? = null, + + @field:Valid + @get:JsonProperty("materials") val materials: kotlin.collections.List? = null, + + @field:Valid + @get:JsonProperty("instrument_ids") val instrumentIds: kotlin.collections.List? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaResponse.kt new file mode 100644 index 00000000..213fac08 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetInstrumentsByCriteriaResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentDetail +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class GetInstrumentsByCriteriaResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetManufacturersResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetManufacturersResponse.kt new file mode 100644 index 00000000..f9472004 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/GetManufacturersResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.ManufactureType +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class GetManufacturersResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetail.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetail.kt new file mode 100644 index 00000000..5f3ff6e9 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetail.kt @@ -0,0 +1,62 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.BasicMaterial +import mu.muse.rest.dto.Country +import mu.muse.rest.dto.InstrumentId +import mu.muse.rest.dto.InstrumentName +import mu.muse.rest.dto.InstrumentType +import mu.muse.rest.dto.ManufactureDate +import mu.muse.rest.dto.ManufactureType +import mu.muse.rest.dto.ReleaseDate +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentId + * @param instrumentName + * @param instrumentType + * @param manufacturerType + * @param manufacturerDate + * @param releaseDate + * @param country + * @param basicMaterials + */ +data class InstrumentDetail( + + @field:Valid + @get:JsonProperty("instrument_id", required = true) val instrumentId: InstrumentId, + + @field:Valid + @get:JsonProperty("instrument_name", required = true) val instrumentName: InstrumentName, + + @field:Valid + @get:JsonProperty("instrument_type", required = true) val instrumentType: InstrumentType, + + @field:Valid + @get:JsonProperty("manufacturer_type", required = true) val manufacturerType: ManufactureType, + + @field:Valid + @get:JsonProperty("manufacturer_date", required = true) val manufacturerDate: ManufactureDate, + + @field:Valid + @get:JsonProperty("release_date", required = true) val releaseDate: ReleaseDate, + + @field:Valid + @get:JsonProperty("country", required = true) val country: Country, + + @field:Valid + @get:JsonProperty("basic_materials", required = true) val basicMaterials: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetailWithoutId.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetailWithoutId.kt new file mode 100644 index 00000000..00f70daa --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentDetailWithoutId.kt @@ -0,0 +1,57 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.BasicMaterial +import mu.muse.rest.dto.Country +import mu.muse.rest.dto.InstrumentName +import mu.muse.rest.dto.InstrumentType +import mu.muse.rest.dto.ManufactureDate +import mu.muse.rest.dto.ManufactureType +import mu.muse.rest.dto.ReleaseDate +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentName + * @param instrumentType + * @param manufacturerType + * @param manufacturerDate + * @param releaseDate + * @param country + * @param basicMaterials + */ +data class InstrumentDetailWithoutId( + + @field:Valid + @get:JsonProperty("instrument_name", required = true) val instrumentName: InstrumentName, + + @field:Valid + @get:JsonProperty("instrument_type", required = true) val instrumentType: InstrumentType, + + @field:Valid + @get:JsonProperty("manufacturer_type", required = true) val manufacturerType: ManufactureType, + + @field:Valid + @get:JsonProperty("manufacturer_date", required = true) val manufacturerDate: ManufactureDate, + + @field:Valid + @get:JsonProperty("release_date", required = true) val releaseDate: ReleaseDate, + + @field:Valid + @get:JsonProperty("country", required = true) val country: Country, + + @field:Valid + @get:JsonProperty("basic_materials", required = true) val basicMaterials: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentId.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentId.kt new file mode 100644 index 00000000..2f3b6933 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentId.kt @@ -0,0 +1,25 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentId + */ +data class InstrumentId( + + @get:JsonProperty("instrument_id", required = true) val instrumentId: kotlin.Long + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentName.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentName.kt new file mode 100644 index 00000000..a5ed63e3 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentName.kt @@ -0,0 +1,25 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param instrumentName + */ +data class InstrumentName( + + @get:JsonProperty("instrument_name", required = true) val instrumentName: kotlin.String + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentPhoto.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentPhoto.kt new file mode 100644 index 00000000..2e20c9af --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentPhoto.kt @@ -0,0 +1,25 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param photo + */ +data class InstrumentPhoto( + + @get:JsonProperty("photo", required = true) val photo: kotlin.String + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt new file mode 100644 index 00000000..b9d3ee30 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param i18nCode + * @param localizedText + */ +data class InstrumentType( + + @get:JsonProperty("i18n_code", required = true) val i18nCode: kotlin.String, + + @get:JsonProperty("localized_text") val localizedText: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/JwtResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/JwtResponse.kt new file mode 100644 index 00000000..dc6fd35d --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/JwtResponse.kt @@ -0,0 +1,25 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param jwt + */ +data class JwtResponse( + + @get:JsonProperty("jwt", required = true) val jwt: kotlin.String + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ListFavoriteResponse.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ListFavoriteResponse.kt new file mode 100644 index 00000000..be1c35cd --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ListFavoriteResponse.kt @@ -0,0 +1,27 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import mu.muse.rest.dto.InstrumentDetail +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param content + */ +data class ListFavoriteResponse( + + @field:Valid + @get:JsonProperty("content", required = true) val content: kotlin.collections.List + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureDate.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureDate.kt new file mode 100644 index 00000000..70a22bcb --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureDate.kt @@ -0,0 +1,26 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param manufactureDate + */ +data class ManufactureDate( + + @field:Valid + @get:JsonProperty("manufacture_date", required = true) val manufactureDate: java.time.LocalDate + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureType.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureType.kt new file mode 100644 index 00000000..44a74f4e --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ManufactureType.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param i18nCode + * @param localizedMessage + */ +data class ManufactureType( + + @get:JsonProperty("i18n_code", required = true) val i18nCode: kotlin.String, + + @get:JsonProperty("localized_message") val localizedMessage: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ProfileDetails.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ProfileDetails.kt new file mode 100644 index 00000000..84864b75 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ProfileDetails.kt @@ -0,0 +1,31 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param username + * @param role + * @param fullName + */ +data class ProfileDetails( + + @get:JsonProperty("username", required = true) val username: kotlin.String, + + @get:JsonProperty("role", required = true) val role: kotlin.String, + + @get:JsonProperty("full_name", required = true) val fullName: kotlin.String + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/RegistrationRequest.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/RegistrationRequest.kt new file mode 100644 index 00000000..1c1e084d --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/RegistrationRequest.kt @@ -0,0 +1,31 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param fullName + * @param login + * @param password + */ +data class RegistrationRequest( + + @get:JsonProperty("full_name", required = true) val fullName: kotlin.String, + + @get:JsonProperty("login", required = true) val login: kotlin.String, + + @get:JsonProperty("password", required = true) val password: kotlin.String + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ReleaseDate.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ReleaseDate.kt new file mode 100644 index 00000000..2b114c68 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ReleaseDate.kt @@ -0,0 +1,26 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param releaseDate + */ +data class ReleaseDate( + + @field:Valid + @get:JsonProperty("release_date", required = true) val releaseDate: java.time.LocalDate + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ServerError.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ServerError.kt new file mode 100644 index 00000000..298c619e --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/ServerError.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param message A description of the error + * @param cause Exception stack trace + */ +data class ServerError( + + @get:JsonProperty("message") val message: kotlin.String? = null, + + @get:JsonProperty("cause") val cause: kotlin.String? = null + ) { + +} + diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/UsernameAndPasswordRequestBody.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/UsernameAndPasswordRequestBody.kt new file mode 100644 index 00000000..2374de55 --- /dev/null +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/UsernameAndPasswordRequestBody.kt @@ -0,0 +1,28 @@ +package mu.muse.rest.dto + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid + +/** + * + * @param username + * @param password + */ +data class UsernameAndPasswordRequestBody( + + @get:JsonProperty("username", required = true) val username: kotlin.String, + + @get:JsonProperty("password", required = true) val password: kotlin.String + ) { + +} +