Skip to content
Snippets Groups Projects
Commit 2527893d authored by Paulo Pimenta's avatar Paulo Pimenta
Browse files

refactor(swagger): added a missing configuration class that allows spring boot...

refactor(swagger): added a missing configuration class that allows spring boot to recognize swagger annotation tags
parent 80cc2165
No related branches found
No related tags found
No related merge requests found
package com.smartharvester.config;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
public class OpenApiConfig {
@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.components(new Components())
.info(new Info().title("Smart Harvester Application API").description(
"This is a the Smart Harvester RESTful service description OpenAPI 3."));
}
}
......@@ -25,6 +25,7 @@ import java.util.UUID;
@CrossOrigin(origins = "*")
@RequestMapping("/harvester/auth")
@Tag(name="SmartHarvester authentication", description = "User authentication")
@RestController
public class SmartHarvesterAuthController {
......@@ -41,6 +42,7 @@ public class SmartHarvesterAuthController {
JwtUtils jwtUtils;
@PostMapping("/signin")
@Tag(name = "Test")
public ResponseEntity<?> authenticateUser(@Valid @RequestBody SignInRequest signInRequest) {
Authentication authentication = authenticationManager.authenticate(
......
......@@ -11,6 +11,7 @@ import com.smartharvester.exception.ResourceNotFoundException;
import com.smartharvester.model.openapi.OpenApi;
import com.smartharvester.service.OpenApiService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.parser.OpenAPIV3Parser;
import io.swagger.v3.parser.core.models.SwaggerParseResult;
......@@ -41,8 +42,8 @@ import static org.springframework.data.mongodb.core.query.Criteria.where;
import static org.springframework.data.mongodb.core.query.Query.query;
@CrossOrigin(origins = "*")
@Api(tags="OpenApi")
@RequestMapping("/harvester/api")
@Tag(name = "Harvest",description = "Harvest Repositories")
@RestController
public class SmartHarvesterController {
......
......@@ -11,6 +11,7 @@ import com.smartharvester.exception.ResourceNotFoundException;
import com.smartharvester.model.openapi.OpenApi;
import com.smartharvester.model.user.SmartHarvesterUser;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
......@@ -20,6 +21,7 @@ import java.util.*;
@CrossOrigin(origins = "*")
@RestController
@Tag(name="SmartHarvester users", description = "User management")
@RequestMapping("/harvester/api")
public class SmartHarvesterUserController {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment