我有一个像这样的 gitlab-ci.yml 文件,并且只想在 Branch Master 上运行它。如果有推送到开发分支,则管道不应启动。
我尝试使用“only”关键字,但它显示错误。
stages:
- info
- build
- test
- review
- cleanup
- deploy-dev
- integration-test
- deploy-test
- system-test
- deploy-production
only:
refs:
- master
Run Code Online (Sandbox Code Playgroud) 我正在使用 Swagger 版本 2.1.9 从 Springfox 迁移到 Springdoc。
因此,必须重写注释,并且我找不到旧 Swagger 注释的等效注释。
我有这个 API 控制器:
@GetMapping
@ApiOperation(value = "Load Building")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = Building.class, responseContainer = "Page")
})
public ResponseEntity<Page<Building>> getBuilding(Pageable building) {
final Page<Building> building = buildingrepo.findAll(page).map(bw -> mapper.map(bd, Building.class));
return ResponseEntity.ok().body(building);
Run Code Online (Sandbox Code Playgroud)
使用新的 Swagger 注释,必须重新编写它,但我不知道如何将“Building.class”放入响应架构中的可分页中。我不能再使用“responseContainer”
@GetMapping
@Operation(summary = "Load Building")
@ApiResponses(value = {
@ApiResponse(responseCode = "200",
description = "OK",
content = @Content(schema = @Schema(implementation = Building.class))) // <--- Here i need the …Run Code Online (Sandbox Code Playgroud)