logs
This commit is contained in:
parent
ce0d63d7f9
commit
4a12dceab6
@ -24,14 +24,10 @@ public class Swagger2Config extends WebMvcConfigurationSupport {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
Parameter authHeader = new ParameterBuilder()
|
||||
.parameterType("header")
|
||||
.name("Authorization")
|
||||
.modelRef(new ModelRef("string"))
|
||||
.build();
|
||||
Parameter authHeader = new ParameterBuilder().parameterType("header").name("Authorization")
|
||||
.modelRef(new ModelRef("string")).build();
|
||||
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.plannaplan")).paths(PathSelectors.any())
|
||||
.build()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.plannaplan")).paths(PathSelectors.any()).build()
|
||||
.globalOperationParameters(Collections.singletonList(authHeader));
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,8 @@ public class GroupController {
|
||||
@PutMapping("/{id}/capacity")
|
||||
@ApiOperation(value = "Change capacity of given group. You need to provide DEANERY token to be ale to change capacity")
|
||||
public ResponseEntity<String> updateCapacity(
|
||||
@PathVariable(name = "id") @ApiParam(value = "id of group to change capacity") Long id,
|
||||
@RequestParam(name = "newcapacity") @ApiParam(value = "capacity to be set") int newcapacity) {
|
||||
@PathVariable(name = "id", required = true) @ApiParam(value = "id of group to change capacity") Long id,
|
||||
@RequestParam(name = "newcapacity", required = true) Integer newcapacity) {
|
||||
final Groups group = this.groupService.getGroupById(id).get();
|
||||
if (group == null) {
|
||||
return new ResponseEntity<>("Given group doens't exist", HttpStatus.NOT_FOUND);
|
||||
|
@ -8,6 +8,7 @@ spring.jpa.hibernate.ddl-auto=create-drop
|
||||
spring.jackson.serialization.fail-on-empty-beans=false
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
spring.jackson.default-property-inclusion = NON_NULL
|
||||
logging.level.io.swagger.models.parameters.AbstractSerializableParameter=ERROR
|
||||
server.port=1285
|
||||
plannaplan.dev = true
|
||||
plannaplan.frontendUrl= http://localhost:3000
|
@ -8,6 +8,7 @@ spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jackson.serialization.fail-on-empty-beans=false
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
spring.jackson.default-property-inclusion = NON_NULL
|
||||
logging.level.io.swagger.models.parameters.AbstractSerializableParameter=ERROR
|
||||
|
||||
server.port=1285
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user