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

Replace javax with jakarta validation api #7554

Merged
merged 6 commits into from
Mar 23, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ dependencies {
api("io.openlineage:openlineage-java:${openlineageVersion}")
api("jakarta.persistence:jakarta.persistence-api:${jakartapersistenceVersion}")
api("jakarta.validation:jakarta.validation-api:${jakartavalidationVersion}")
api("javax.validation:validation-api:${validationVersion}")
api("javax.xml.bind:jaxb-api:${jaxbVersion}")
api("org.apache.avro:avro:${avroVersion}")
api("org.apache.commons:commons-collections4:${collections4Version}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
compileOnly 'com.fasterxml.jackson.core:jackson-annotations'
implementation project(':open-metadata-implementation:common-services:ffdc-services')
implementation project(':open-metadata-implementation:repository-services:repository-services-apis')
implementation 'javax.validation:validation-api'
implementation 'jakarta.validation:jakarta.validation-api'
implementation project(':open-metadata-implementation:frameworks:audit-log-framework')
implementation project(':open-metadata-implementation:frameworks:open-connector-framework')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.PositiveOrZero;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder;

import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation project(':open-metadata-implementation:common-services:ffdc-services')
implementation 'org.springframework:spring-web'
implementation 'org.springframework:spring-core'
implementation 'javax.validation:validation-api'
implementation 'jakarta.validation:jakarta.validation-api:'
implementation 'io.swagger.core.v3:swagger-annotations'
testImplementation 'org.mockito:mockito-core'
testImplementation 'org.mockito:mockito-junit-jupiter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.*;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse;
Expand All @@ -19,9 +22,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;

/**
* The AssetCatalogEntityResource provides the server-side implementation of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-server')
implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api')
implementation 'org.springframework:spring-web'
implementation 'javax.validation:validation-api'
implementation 'jakarta.validation:jakarta.validation-api'
implementation 'org.springframework:spring-context'
implementation 'io.swagger.core.v3:swagger-annotations'
compileOnly 'com.fasterxml.jackson.core:jackson-annotations'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PositiveOrZero;
import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse;
import org.odpi.openmetadata.accessservices.glossaryview.server.service.CategoryService;
import org.springframework.validation.annotation.Validated;
Expand All @@ -13,10 +16,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.PositiveOrZero;

import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE;
import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE;
import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE;
Expand All @@ -28,11 +27,15 @@
@Validated
@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}")

@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/"))
@Tag(name="Glossary View OMAS",
description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.",
externalDocs=@ExternalDocumentation(
description="Glossary View Open Metadata Access Service (OMAS)",
url="https://egeria-project.org/services/omas/glossary-view/overview/"))

public class CategoryResource {

private CategoryService categoryService;
private final CategoryService categoryService;

/**
* Called by Spring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PositiveOrZero;
import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse;
import org.odpi.openmetadata.accessservices.glossaryview.server.service.GlossaryService;
import org.springframework.validation.annotation.Validated;
Expand All @@ -13,9 +16,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.PositiveOrZero;

import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE;
import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE;
Expand All @@ -28,11 +28,15 @@
@Validated
@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}")

@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/"))
@Tag(name="Glossary View OMAS",
description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.",
externalDocs=@ExternalDocumentation(
description="Glossary View Open Metadata Access Service (OMAS)",
url="https://egeria-project.org/services/omas/glossary-view/overview/"))

public class GlossaryResource {

private GlossaryService glossaryService;
private final GlossaryService glossaryService;

/**
* Called by Spring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PositiveOrZero;
import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse;
import org.odpi.openmetadata.accessservices.glossaryview.server.service.TermService;
import org.springframework.validation.annotation.Validated;
Expand All @@ -13,10 +16,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.PositiveOrZero;

import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE;
import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE;
import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE;
Expand All @@ -28,11 +27,15 @@
@Validated
@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}")

@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/"))
@Tag(name="Glossary View OMAS",
description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.",
externalDocs=@ExternalDocumentation(
description="Glossary View Open Metadata Access Service (OMAS)",
url="https://egeria-project.org/services/omas/glossary-view/overview/"))

public class TermResource {

private TermService termService;
private final TermService termService;

/**
* Called by Spring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-engine/users/{userId}")

@Tag(name="Governance Engine OMAS", description="The Governance Engine Open Metadata Access Service (OMAS) provides support for governance engines, services and actions.",
externalDocs=@ExternalDocumentation(description="Governance Engine Open Metadata Access Service (OMAS)",
@Tag(name="Governance Engine OMAS",
description="The Governance Engine Open Metadata Access Service (OMAS) provides support for governance engines, services and actions.",
externalDocs=@ExternalDocumentation(
description="Governance Engine Open Metadata Access Service (OMAS)",
url="https://egeria-project.org/services/omas/governance-engine/overview/"))

public class GroupConfigurationResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
url="https://egeria-project.org/concepts/omag-server-platform/")
)


@Configuration
public class OMAGServerPlatform
{
@Value("${strict.ssl}")
Expand Down Expand Up @@ -227,7 +225,7 @@ public FilterRegistrationBean<HttpRequestHeadersFilter> getRequestHeadersFilter(
FilterRegistrationBean<HttpRequestHeadersFilter> registrationBean = new FilterRegistrationBean<>();

registrationBean.setFilter(new HttpRequestHeadersFilter(headerNames));
registrationBean.addUrlPatterns("/*");
registrationBean.addUrlPatterns("/open-metadata/*");
registrationBean.setOrder(1);

return registrationBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ description = 'UI Server Platform Chassis for Spring'

bootJar {
manifest {
// attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
mainClass = 'org.odpi.openmetadata.userinterface.uichassis.springboot.EgeriaUIPlatform'
attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
// mainClass = 'org.odpi.openmetadata.userinterface.uichassis.springboot.EgeriaUIPlatform'
}
}

Expand Down