diff --git a/docs/openapi_v002.json b/docs/openapi_v002.json index 138dc89c8..a8c2f69f8 100644 --- a/docs/openapi_v002.json +++ b/docs/openapi_v002.json @@ -2,19 +2,18 @@ "openapi": "3.0.1", "info": { - "title": "Managed Identity Wallets API", - "description": "Managed Identity Wallets API", - "contact": - { - "name": "Eclipse Tractus-X", - "url": "https://projects.eclipse.org/projects/automotive.tractusx", - "email": "tractusx-dev@eclipse.org" - }, - "license": - { - "name": "Apache 2.0", - "url": "https://github.com/eclipse-tractusx/managed-identity-wallets/blob/develop/LICENSE" - }, + "title": "Managed Identity Wallets API", + "description": "Managed Identity Wallets API", + "termsOfService": "https://www.eclipse.org/legal/termsofuse.php", + "contact": { + "name": "Eclipse Tractus-X", + "url": "https://projects.eclipse.org/projects/automotive.tractusx", + "email": "tractusx-dev@eclipse.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://github.com/eclipse-tractusx/managed-identity-wallets/blob/develop/LICENSE" + }, "version": "0.0.1" }, "servers": diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/openapi/OpenApiConfig.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/openapi/OpenApiConfig.java index 435ae8585..76dd3f645 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/openapi/OpenApiConfig.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/config/openapi/OpenApiConfig.java @@ -24,7 +24,9 @@ import io.swagger.v3.oas.models.Components; 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.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; import lombok.AllArgsConstructor; @@ -53,9 +55,22 @@ public class OpenApiConfig { @Bean public OpenAPI openAPI() { Info info = new Info(); - info.setTitle("MIW API"); - info.setDescription("MIW API"); + info.setTitle("Managed Identity Wallets API"); + info.setDescription("Managed Identity Wallets API"); + info.termsOfService("https://www.eclipse.org/legal/termsofuse.php"); info.setVersion("0.0.1"); + + Contact contact = new Contact(); + contact.name("Eclipse Tractus-X"); + contact.email("tractusx-dev@eclipse.org"); + contact.url("https://projects.eclipse.org/projects/automotive.tractusx"); + info.contact(contact); + + License license = new License(); + license.name("Apache 2.0"); + license.url("https://github.com/eclipse-tractusx/managed-identity-wallets/blob/develop/LICENSE"); + info.license(license); + OpenAPI openAPI = new OpenAPI(); if (Boolean.TRUE.equals(properties.enabled())) { openAPI = enableSecurity(openAPI);