-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplicationConfiguration.txt
More file actions
40 lines (30 loc) · 1.39 KB
/
ApplicationConfiguration.txt
File metadata and controls
40 lines (30 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package edu.jsp.springbootuserapp.config;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.servers.Server;
@Configuration
public class ApplicationConfiguration {
@Bean
public OpenAPI usersMicroserviceOpenAPI() {
Server devServer = new Server();
devServer.setUrl("http://localhost:8080");
devServer.setDescription("Server URL in Development environment");
Server prodServer = new Server();
prodServer.setUrl("http://localhost:8080/swagger-ui/index.html");
prodServer.setDescription("Swagger Url");
Contact contact = new Contact();
contact.setEmail("info@AppDomainName.in");
contact.setName("App_Name");
contact.setUrl("https://www.AppDomainName.in");
License mitLicense = new License().name("MIT License").url("https://choosealicense.com/licenses/mit/");
Info info = new Info().title("Application_Name RESTful Web Service documentation").version("1.0")
.contact(contact).description("This API exposes endpoints to manage AppName.")
.termsOfService("https://www.AppDomainName.com/terms").license(mitLicense);
return new OpenAPI().info(info).servers(List.of(devServer, prodServer));
}
}