diff --git a/restservice/src/main/java/com/plannaplan/Swagger2Config.java b/restservice/src/main/java/com/plannaplan/Swagger2Config.java index 5ccbe90..b1bd6d6 100755 --- a/restservice/src/main/java/com/plannaplan/Swagger2Config.java +++ b/restservice/src/main/java/com/plannaplan/Swagger2Config.java @@ -19,7 +19,7 @@ public class Swagger2Config extends WebMvcConfigurationSupport { @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() - .apis(RequestHandlerSelectors.basePackage("com.plannaplan.controllers")).paths(PathSelectors.any()) + .apis(RequestHandlerSelectors.basePackage("com.plannaplan")).paths(PathSelectors.any()) .build(); } diff --git a/restservice/src/main/java/com/plannaplan/controllers/CommisionController.java b/restservice/src/main/java/com/plannaplan/controllers/CommisionController.java index ef578c0..03c835c 100755 --- a/restservice/src/main/java/com/plannaplan/controllers/CommisionController.java +++ b/restservice/src/main/java/com/plannaplan/controllers/CommisionController.java @@ -37,7 +37,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @RestController @CrossOrigin @RequestMapping("/api/" + App.API_VERSION + "/commisions") -@Api(tags = { "Commisions" }, value = "Commisions", description = "Commision is representation of student selected assignments at time. All assignments are attached to some commision so we can see current assignments and also browse histroy of changes for given user") +@Api(tags = { "Commisions" }, value = "Commisions", description = "Commision is representation of student selected assignments at time. All assignments are attached to some commision so we can see current assignments and also browse history of changes for given user") public class CommisionController extends TokenBasedController { @Autowired diff --git a/restservice/src/main/java/com/plannaplan/responses/models/CommisionResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/CommisionResponse.java index 585d871..29e04b4 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/CommisionResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/CommisionResponse.java @@ -4,8 +4,15 @@ import java.sql.Timestamp; import com.plannaplan.entities.Commision; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(description = "Response shows information about commision", value = "CommisionResponse") public class CommisionResponse { + @ApiModelProperty(value = "ID created by database") private Long id; + + @ApiModelProperty(value = "Timestamp where the user commit the commision") private Timestamp commisionDate; public CommisionResponse(Commision commision) { diff --git a/restservice/src/main/java/com/plannaplan/responses/models/DefaultGroupResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/DefaultGroupResponse.java index 6054be1..72659cc 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/DefaultGroupResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/DefaultGroupResponse.java @@ -4,13 +4,28 @@ import com.plannaplan.entities.Assignment; import com.plannaplan.entities.Groups; import com.plannaplan.types.GroupType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(description = "Response shows information about given group", value = "DefaultGroupResponse") public class DefaultGroupResponse { + @ApiModelProperty(value = "ID created by database.") private Long id; + + @ApiModelProperty(value = "Value shows what day when the course is. Example 0 is Monday.") private int day; + + @ApiModelProperty(value = "Value shows time when the course takes.") private String time; + + @ApiModelProperty(value = "Value shows degree, name and surname.") private String lecturer; + + @ApiModelProperty(value = "Value shows room where the class takes.") private String room; + + @ApiModelProperty(value = "Value shows kind of group. The types are LECTURE or CLASS.") private GroupType type; public DefaultGroupResponse(Groups group) { diff --git a/restservice/src/main/java/com/plannaplan/responses/models/GetCourseGroupsResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/GetCourseGroupsResponse.java index c07bede..f2bcc45 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/GetCourseGroupsResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/GetCourseGroupsResponse.java @@ -3,6 +3,9 @@ package com.plannaplan.responses.models; import java.util.ArrayList; import java.util.List; +import io.swagger.annotations.ApiModel; + +@ApiModel(description = "Response shows information about groups to given course.", value = "DefaultGroupResponse") public class GetCourseGroupsResponse { private List lectures = new ArrayList<>(); diff --git a/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesResponse.java index 565eb80..c76157f 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesResponse.java @@ -3,6 +3,9 @@ package com.plannaplan.responses.models; import com.plannaplan.entities.Course; import com.plannaplan.responses.models.abstracts.CoursesResponse; +import io.swagger.annotations.ApiModel; + +@ApiModel(description = "Response shows information about course.", value = "DefaultGroupResponse") public class GetCoursesResponse extends CoursesResponse { public GetCoursesResponse(Course course) { diff --git a/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesWithGroupsResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesWithGroupsResponse.java index 404366d..0dd2d49 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesWithGroupsResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/GetCoursesWithGroupsResponse.java @@ -7,6 +7,9 @@ import com.plannaplan.entities.Course; import com.plannaplan.responses.models.abstracts.CoursesResponse; import com.plannaplan.types.GroupType; +import io.swagger.annotations.ApiModel; + +@ApiModel(description = "Response shows information about groups to given course.", value = "GetCoursesWithGroupsResponse") public class GetCoursesWithGroupsResponse extends CoursesResponse { private List lectures = new ArrayList<>(); diff --git a/restservice/src/main/java/com/plannaplan/responses/models/GetCurrentAssignmentsResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/GetCurrentAssignmentsResponse.java index 6296a87..416e61f 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/GetCurrentAssignmentsResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/GetCurrentAssignmentsResponse.java @@ -4,6 +4,9 @@ import com.plannaplan.entities.Course; import com.plannaplan.entities.Groups; import com.plannaplan.types.GroupType; +import io.swagger.annotations.ApiModel; + +@ApiModel(description = "Response shows information about given assigment to course.", value = "GetCurrentAssignmentsResponse") public class GetCurrentAssignmentsResponse { private Long id; private String name; diff --git a/restservice/src/main/java/com/plannaplan/responses/models/SearchForStudentsResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/SearchForStudentsResponse.java index 01602be..5e4b2b6 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/SearchForStudentsResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/SearchForStudentsResponse.java @@ -2,6 +2,9 @@ package com.plannaplan.responses.models; import com.plannaplan.entities.User; +import io.swagger.annotations.ApiModel; + +@ApiModel(description = "Response shows information about user.", value = "SearchForStudentsResponse") public class SearchForStudentsResponse { private Long id; diff --git a/restservice/src/main/java/com/plannaplan/responses/models/WithCapacityGroupResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/WithCapacityGroupResponse.java index 4b40dc4..ad422e6 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/WithCapacityGroupResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/WithCapacityGroupResponse.java @@ -2,7 +2,9 @@ package com.plannaplan.responses.models; import com.plannaplan.entities.Assignment; import com.plannaplan.entities.Groups; +import io.swagger.annotations.ApiModel; +@ApiModel(description = "Response shows information about group with included capacity.", value = "WithCapacityGroupResponse") public class WithCapacityGroupResponse extends DefaultGroupResponse { private int capacity;