We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// pom.xml <dependency> <groupId>io.springfox</groupId> <version>2.9.2</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> // Config package com.github.oneline.onelinecourse.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class Swagger2Config { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Oneline-Course") .description("Hello world") .version("v1.0") .build(); } } // Controller @DeleteMapping("/{commentId}") @ApiOperation(value = "댓글 삭제") public ResponseEntity<Void> deleteComment( @PathVariable @ApiParam(value = "댓글 ID", example = "1") Long commentId) { commentService.deleteComment(commentId); return ResponseEntity.noContent() .build(); } // Dto @ApiModelProperty(value = "PK", required = true) private Long id; @ApiModelProperty(value = "댓글 내용", required = true) private String content; @ApiModelProperty(value = "댓글 작성일시", required = true) private LocalDateTime createdAt;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Swagger API
The text was updated successfully, but these errors were encountered: