From 0a5372b32fdeefd58bf535196c4ce2b6f4d5d976 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Fri, 14 Jun 2024 13:23:15 +1200 Subject: [PATCH] Enforce & fix license headers (#1027) * Enforce license headers Signed-off-by: Thomas Farr * spotlessApply Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr (cherry picked from commit 5d5c6b5f09d25765683c23b081511331c2115bab) --- java-codegen/build.gradle.kts | 2 ++ .../org/opensearch/client/codegen/model/Deprecation.java | 8 ++++++++ .../opensearch/client/codegen/model/OperationGroup.java | 8 ++++++++ .../java/org/opensearch/client/codegen/model/Types.java | 8 ++++++++ .../org/opensearch/client/codegen/openapi/HttpMethod.java | 8 ++++++++ .../codegen/openapi/OpenApiOperationBodyElement.java | 8 ++++++++ 6 files changed, 42 insertions(+) diff --git a/java-codegen/build.gradle.kts b/java-codegen/build.gradle.kts index 4179f5b3fa..c4e4daad66 100644 --- a/java-codegen/build.gradle.kts +++ b/java-codegen/build.gradle.kts @@ -251,6 +251,8 @@ spotless { java { target("**/*.java") + licenseHeaderFile("../LICENSE_HEADER.txt") + // Use the default importOrder configuration importOrder() removeUnusedImports() diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Deprecation.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Deprecation.java index efe8c05826..9b1818a852 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Deprecation.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Deprecation.java @@ -1,3 +1,11 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearch.client.codegen.model; import java.util.Optional; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/OperationGroup.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/OperationGroup.java index 0ccf012762..fa158e8e5f 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/OperationGroup.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/OperationGroup.java @@ -1,3 +1,11 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearch.client.codegen.model; import java.util.Collection; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java index 34e39f66bf..5451ae949f 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java @@ -1,3 +1,11 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearch.client.codegen.model; import java.lang.reflect.Modifier; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpMethod.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpMethod.java index 0659e5e725..8ef3dd8db8 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpMethod.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpMethod.java @@ -1,3 +1,11 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearch.client.codegen.openapi; import io.swagger.v3.oas.models.PathItem; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiOperationBodyElement.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiOperationBodyElement.java index a118b6a572..3b5db201ca 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiOperationBodyElement.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiOperationBodyElement.java @@ -1,3 +1,11 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearch.client.codegen.openapi; import io.swagger.v3.oas.models.media.Content;