/
skonoplich
/
testovoe
Обзор
Документация
Войти
/
skonoplich
/
testovoe
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
api-classes/HotelsApi.java
147 строк
5 KB
sk
wip
10 мар 2026, 21:37
10 мар 2026, 21:37
1f5b918
Код
Авторство
О чём код?
/* * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0). * https://openapi-generator.tech * Do not edit the class manually. */ package o.e.api; import o.e.api.model.HotelBrief; import o.e.api.model.HotelCreate; import o.e.api.model.HotelDetailed; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.util.List; import java.util.Map; import java.util.Optional; import jakarta.annotation.Generated; @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-03-09T20:58:53.400428235+03:00[Europe/Moscow]", comments = "Generator version: 7.20.0") @Validated @Tag(name = "hotels", description = "the hotels API") public interface HotelsApi { String PATH_ADD_AMENITIES_TO_HOTEL = "/hotels/{id}/amenities"; /** * POST /hotels/{id}/amenities : Add amenities to a hotel * * @param id (required) * @param requestBody (required) * @return Successful operation (status code 200) */ @Operation( operationId = "addAmenitiesToHotel", summary = "Add amenities to a hotel", tags = { "hotels" }, responses = { @ApiResponse(responseCode = "200", description = "Successful operation") } ) @RequestMapping( method = RequestMethod.POST, value = HotelsApi.PATH_ADD_AMENITIES_TO_HOTEL, consumes = { "application/json" } ) ResponseEntity<Void> addAmenitiesToHotel( @NotNull @Parameter(name = "id", description = "", required = true, in = ParameterIn.PATH) @PathVariable("id") Long id, @Parameter(name = "request_body", description = "", required = true) @Valid @RequestBody List<String> requestBody ); String PATH_CREATE_HOTEL = "/hotels"; /** * POST /hotels : Create new hotel * * @param hotelCreate (required) * @return Successful operation (status code 200) */ @Operation( operationId = "createHotel", summary = "Create new hotel", tags = { "hotels" }, responses = { @ApiResponse(responseCode = "200", description = "Successful operation", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = HotelBrief.class)) }) } ) @RequestMapping( method = RequestMethod.POST, value = HotelsApi.PATH_CREATE_HOTEL, produces = { "application/json" }, consumes = { "application/json" } ) ResponseEntity<HotelBrief> createHotel( @Parameter(name = "HotelCreate", description = "", required = true) @Valid @RequestBody HotelCreate hotelCreate ); String PATH_GET_HOTEL_BY_ID = "/hotels/{id}"; /** * GET /hotels/{id} : Get detailed information about a specific hotel * * @param id (required) * @return Successful operation (status code 200) */ @Operation( operationId = "getHotelById", summary = "Get detailed information about a specific hotel", tags = { "hotels" }, responses = { @ApiResponse(responseCode = "200", description = "Successful operation", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = HotelDetailed.class)) }) } ) @RequestMapping( method = RequestMethod.GET, value = HotelsApi.PATH_GET_HOTEL_BY_ID, produces = { "application/json" } ) ResponseEntity<HotelDetailed> getHotelById( @NotNull @Parameter(name = "id", description = "", required = true, in = ParameterIn.PATH) @PathVariable("id") Long id ); String PATH_GET_HOTELS = "/hotels"; /** * GET /hotels : Get list of all hotels with brief information * * @return Successful operation (status code 200) */ @Operation( operationId = "getHotels", summary = "Get list of all hotels with brief information", tags = { "hotels" }, responses = { @ApiResponse(responseCode = "200", description = "Successful operation", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = HotelBrief.class))) }) } ) @RequestMapping( method = RequestMethod.GET, value = HotelsApi.PATH_GET_HOTELS, produces = { "application/json" } ) ResponseEntity<List<HotelBrief>> getHotels( ); }