Skip to content
New issue

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

Rename swagger to openapi in configuration #1387

Merged
merged 1 commit into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"keyStoreFilePath":"keystore/lightyio.jks",
"trustKeyStorePassword":"8pgETwat",
"trustKeyStoreFilePath":"keystore/lightyio.jks",
"enableSwagger": false
"enableOpenApi": false
},
"netconf-northbound":{
"connectionTimeout":20000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ data:
"keyStoreFilePath": "{{ .Values.lighty.server.keyStoreDirectory }}/{{ .Values.lighty.server.keyStoreFileName }}",
"trustKeyStorePassword": {{ .Values.lighty.server.trustKeyStorePassword | quote }},
"trustKeyStoreFilePath": "{{ .Values.lighty.server.trustKeyStoreDirectory }}/{{ .Values.lighty.server.trustKeyStoreFileName }}",
"enableSwagger": {{ .Values.lighty.server.enableSwagger }}
"enableOpenApi": {{ .Values.lighty.server.enableOpenApi }}
},
"netconf-northbound":{
"connectionTimeout":20000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lighty:
trustKeyStorePassword: "8pgETwat"
trustKeyStoreDirectory: "keystore"
trustKeyStoreFileName: "lightyio.jks"
enableSwagger: false
enableOpenApi: false

jmx:
# Port on which JMX server in image is listening, should be same as defined in dockerfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public boolean initModules() {
startAndWaitLightyModule(this.aaaLighty);
}

if (rncModuleConfig.getServerConfig().isEnableSwagger()) {
if (rncModuleConfig.getServerConfig().isEnableOpenApi()) {
this.swagger = initSwaggerLighty(this.rncModuleConfig.getRestconfConfig(),
this.jettyServerBuilder,
this.lightyController.getServices());
Expand Down Expand Up @@ -172,7 +172,7 @@ private void startAndWaitLightyModule(final LightyModule lightyModule) throws Rn
public boolean close() {
LOG.info("Stopping RNC lighty.io application...");
boolean success = true;
if (rncModuleConfig.getServerConfig().isEnableSwagger() && this.swagger != null) {
if (rncModuleConfig.getServerConfig().isEnableOpenApi() && this.swagger != null) {
success &= swagger.shutdown(lightyModuleTimeout, DEFAULT_LIGHTY_MODULE_TIME_UNIT);
}
if (this.rncModuleConfig.getAaaConfig().isEnableAAA() && this.aaaLighty != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static String[] swaggerUris() {
@BeforeClass
public void startUp() throws Exception {
final var configPath = Paths.get(Objects.requireNonNull(this.getClass()
.getResource("/swagger_config.json")).toURI());
.getResource("/openapi_config.json")).toURI());
rncModule = new RncLightyModule(RncLightyModuleConfigUtils.loadConfigFromFile(configPath));
assertTrue(rncModule.initModules());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@
"restconfServletContextPath":"/restconf"
},
"lighty-server" : {
"enableSwagger": true
"enableOpenApi": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class LightyServerConfig {
private boolean useHttps = false;
private boolean useHttp2 = false;
private boolean needClientAuth = false;
private boolean enableSwagger = false;
private boolean enableOpenApi = false;

public void setSecurityConfig(final SecurityConfig securityConfig) {
this.securityConfig = securityConfig;
Expand Down Expand Up @@ -86,12 +86,12 @@ public void setNeedClientAuth(boolean needClientAuth) {
this.needClientAuth = needClientAuth;
}

public boolean isEnableSwagger() {
return enableSwagger;
public boolean isEnableOpenApi() {
return enableOpenApi;
}

public void setEnableSwagger(boolean enableSwagger) {
this.enableSwagger = enableSwagger;
public void setEnableOpenApi(boolean enableOpenApi) {
this.enableOpenApi = enableOpenApi;
}

public boolean isUseHttp2() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"lighty-server": {
"useHttps": true,
"needClientAuth": true,
"enableSwagger": true
"enableOpenApi": true
}
}