diff --git a/changelog/@unreleased/pr-1150.v2.yml b/changelog/@unreleased/pr-1150.v2.yml new file mode 100644 index 000000000..24cd3ebdb --- /dev/null +++ b/changelog/@unreleased/pr-1150.v2.yml @@ -0,0 +1,6 @@ +type: improvement +improvement: + description: Apply `@Incubating` annotations based on the `incubating` endpoint + tag + links: + - https://github.com/palantir/conjure-java/pull/1150 diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/ConjureAnnotations.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/ConjureAnnotations.java index 7ea6187dc..06260e984 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/ConjureAnnotations.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/ConjureAnnotations.java @@ -17,7 +17,9 @@ package com.palantir.conjure.java; import com.google.common.collect.ImmutableList; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.conjure.spec.Documentation; +import com.palantir.conjure.spec.EndpointDefinition; import com.squareup.javapoet.AnnotationSpec; import com.squareup.javapoet.ClassName; import java.util.Optional; @@ -36,5 +38,12 @@ public static ImmutableList deprecation(Optional : ImmutableList.of(); } + public static ImmutableList incubating(EndpointDefinition definition) { + if (definition.getTags().contains("incubating")) { + return ImmutableList.of(AnnotationSpec.builder(Incubating.class).build()); + } + return ImmutableList.of(); + } + private ConjureAnnotations() {} } diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/JerseyServiceGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/JerseyServiceGenerator.java index 72e04edc2..19e24a6c4 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/JerseyServiceGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/JerseyServiceGenerator.java @@ -146,6 +146,7 @@ private MethodSpec generateServiceMethod( .addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT) .addAnnotation( httpMethodToClassName(endpointDef.getHttpMethod().get().name())) + .addAnnotations(ConjureAnnotations.incubating(endpointDef)) .addParameters(createServiceMethodParameters(endpointDef, argumentTypeMapper, true)) .returns(returnType); @@ -226,6 +227,7 @@ private MethodSpec createCompatibilityBackfillMethod( endpointDef.getEndpointName().get()) .addModifiers(Modifier.PUBLIC, Modifier.DEFAULT) .addAnnotation(Deprecated.class) + .addAnnotations(ConjureAnnotations.incubating(endpointDef)) .addParameters(IntStream.range(0, sortedParams.size()) .filter(i -> !sortedMaybeExtraArgs.get(i).isPresent()) .mapToObj(sortedParams::get) diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/Retrofit2ServiceGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/Retrofit2ServiceGenerator.java index 5012494e4..b137f80f0 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/Retrofit2ServiceGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/Retrofit2ServiceGenerator.java @@ -150,7 +150,8 @@ private MethodSpec generateServiceMethod( .addAnnotation(AnnotationSpec.builder(ClassName.get("retrofit2.http", "Headers")) .addMember("value", "$S", "hr-path-template: " + endpointPathWithoutRegex) .addMember("value", "$S", "Accept: " + getReturnMediaType(returnType)) - .build()); + .build()) + .addAnnotations(ConjureAnnotations.incubating(endpointDef)); if (returnType.equals(BINARY_RETURN_TYPE) || returnType.equals(OPTIONAL_BINARY_RETURN_TYPE)) { methodBuilder.addAnnotation(AnnotationSpec.builder(ClassName.get("retrofit2.http", "Streaming")) @@ -251,7 +252,8 @@ private MethodSpec createCompatibilityBackfillMethod( .addParameters(IntStream.range(0, sortedParams.size()) .filter(i -> !sortedMaybeExtraArgs.get(i).isPresent()) .mapToObj(sortedParams::get) - .collect(Collectors.toList())); + .collect(Collectors.toList())) + .addAnnotations(ConjureAnnotations.incubating(endpointDef)); endpointDef .getReturns() diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/UndertowServiceInterfaceGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/UndertowServiceInterfaceGenerator.java index aec728974..b8dd5a49e 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/UndertowServiceInterfaceGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/UndertowServiceInterfaceGenerator.java @@ -79,7 +79,8 @@ private MethodSpec generateServiceInterfaceMethod( JavaNameSanitizer.sanitize(endpointDef.getEndpointName().get()); MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder(methodName) .addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT) - .addParameters(createServiceMethodParameters(endpointDef, typeMapper)); + .addParameters(createServiceMethodParameters(endpointDef, typeMapper)) + .addAnnotations(ConjureAnnotations.incubating(endpointDef)); endpointDef.getDeprecated().ifPresent(deprecatedDocsValue -> methodBuilder.addAnnotation(Deprecated.class)); diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueInterfaceGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueInterfaceGenerator.java index 95c187960..77450a7e6 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueInterfaceGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueInterfaceGenerator.java @@ -132,7 +132,8 @@ private MethodSpec apiMethod(EndpointDefinition endpointDef, Function !marker.accept(IsUndertowAsyncMarkerVisitor.INSTANCE)) .map(marker -> { diff --git a/conjure-java-core/src/test/resources/example-service.yml b/conjure-java-core/src/test/resources/example-service.yml index 7e9e29152..545370680 100644 --- a/conjure-java-core/src/test/resources/example-service.yml +++ b/conjure-java-core/src/test/resources/example-service.yml @@ -54,7 +54,9 @@ services: endpoints: getFileSystems: markers: - - Nonnull # requires FeatureFlags.DangerousGothamMethodMarkers + - Nonnull + tags: + - incubating http: GET /fileSystems returns: map docs: | diff --git a/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue b/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue index 65f719cb8..79e5ef52d 100644 --- a/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue @@ -1,5 +1,6 @@ package com.palantir.another; +import com.google.common.collect.ImmutableSet; import com.palantir.dialogue.Endpoint; import com.palantir.dialogue.HttpMethod; import com.palantir.dialogue.PathTemplate; @@ -8,6 +9,7 @@ import java.lang.Override; import java.lang.String; import java.util.Map; import java.util.Optional; +import java.util.Set; import javax.annotation.Generated; @Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator") @@ -19,6 +21,8 @@ enum DialogueTestEndpoints implements Endpoint { private final PathTemplate pathTemplate = PathTemplate.builder().fixed("catalog").fixed("fileSystems").build(); + private final ImmutableSet tags = ImmutableSet.of("incubating"); + @Override public void renderPath(Map params, UrlBuilder url) { pathTemplate.fill(params, url); @@ -43,6 +47,11 @@ enum DialogueTestEndpoints implements Endpoint { public String version() { return VERSION; } + + @Override + public Set tags() { + return tags; + } }, /** diff --git a/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue.prefix b/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue.prefix index e1cb259b1..e935611b4 100644 --- a/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue.prefix +++ b/conjure-java-core/src/test/resources/test/api/DialogueTestEndpoints.java.dialogue.prefix @@ -1,5 +1,6 @@ package test.prefix.com.palantir.another; +import com.google.common.collect.ImmutableSet; import com.palantir.dialogue.Endpoint; import com.palantir.dialogue.HttpMethod; import com.palantir.dialogue.PathTemplate; @@ -8,6 +9,7 @@ import java.lang.Override; import java.lang.String; import java.util.Map; import java.util.Optional; +import java.util.Set; import javax.annotation.Generated; @Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator") @@ -19,6 +21,8 @@ enum DialogueTestEndpoints implements Endpoint { private final PathTemplate pathTemplate = PathTemplate.builder().fixed("catalog").fixed("fileSystems").build(); + private final ImmutableSet tags = ImmutableSet.of("incubating"); + @Override public void renderPath(Map params, UrlBuilder url) { pathTemplate.fill(params, url); @@ -43,6 +47,11 @@ enum DialogueTestEndpoints implements Endpoint { public String version() { return VERSION; } + + @Override + public Set tags() { + return tags; + } }, /** diff --git a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey index 9cb30f11e..349e47489 100644 --- a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey +++ b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey @@ -1,5 +1,6 @@ package com.palantir.another; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.logsafe.Safe; import com.palantir.product.AliasedString; import com.palantir.product.CreateDatasetRequest; @@ -40,6 +41,7 @@ public interface TestService { * Returns a mapping from file system id to backing file system configuration. */ @GET + @Incubating @Path("catalog/fileSystems") Map getFileSystems(@HeaderParam("Authorization") @NotNull AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey.prefix b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey.prefix index 428d887f8..e07abc9e7 100644 --- a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey.prefix @@ -1,5 +1,6 @@ package test.prefix.com.palantir.another; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.logsafe.Safe; import com.palantir.ri.ResourceIdentifier; import com.palantir.tokens.auth.AuthHeader; @@ -39,6 +40,7 @@ public interface TestService { * Returns a mapping from file system id to backing file system configuration. */ @GET + @Incubating @Path("catalog/fileSystems") Map getFileSystems(@HeaderParam("Authorization") AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey_require_not_null b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey_require_not_null index 9cb30f11e..349e47489 100644 --- a/conjure-java-core/src/test/resources/test/api/TestService.java.jersey_require_not_null +++ b/conjure-java-core/src/test/resources/test/api/TestService.java.jersey_require_not_null @@ -1,5 +1,6 @@ package com.palantir.another; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.logsafe.Safe; import com.palantir.product.AliasedString; import com.palantir.product.CreateDatasetRequest; @@ -40,6 +41,7 @@ public interface TestService { * Returns a mapping from file system id to backing file system configuration. */ @GET + @Incubating @Path("catalog/fileSystems") Map getFileSystems(@HeaderParam("Authorization") @NotNull AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestService.java.undertow b/conjure-java-core/src/test/resources/test/api/TestService.java.undertow index 829a824ae..e1aa9b5a5 100644 --- a/conjure-java-core/src/test/resources/test/api/TestService.java.undertow +++ b/conjure-java-core/src/test/resources/test/api/TestService.java.undertow @@ -1,5 +1,6 @@ package com.palantir.another; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.conjure.java.undertow.lib.BinaryResponseBody; import com.palantir.product.AliasedString; import com.palantir.product.CreateDatasetRequest; @@ -24,6 +25,7 @@ public interface TestService { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating Map getFileSystems(AuthHeader authHeader); /** diff --git a/conjure-java-core/src/test/resources/test/api/TestService.java.undertow.prefix b/conjure-java-core/src/test/resources/test/api/TestService.java.undertow.prefix index 7836eefbd..2fefde517 100644 --- a/conjure-java-core/src/test/resources/test/api/TestService.java.undertow.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestService.java.undertow.prefix @@ -1,5 +1,6 @@ package test.prefix.com.palantir.another; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.conjure.java.undertow.lib.BinaryResponseBody; import com.palantir.ri.ResourceIdentifier; import com.palantir.tokens.auth.AuthHeader; @@ -24,6 +25,7 @@ public interface TestService { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating Map getFileSystems(AuthHeader authHeader); /** diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue index f471a2010..3ebe90ed7 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue @@ -1,6 +1,7 @@ package com.palantir.another; import com.google.common.util.concurrent.ListenableFuture; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.dialogue.BinaryRequestBody; import com.palantir.dialogue.Channel; import com.palantir.dialogue.ConjureRuntime; @@ -43,6 +44,7 @@ public interface TestServiceAsync { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating @Nonnull ListenableFuture> getFileSystems(AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix index e7a718e55..e3d6a5314 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix @@ -1,6 +1,7 @@ package test.prefix.com.palantir.another; import com.google.common.util.concurrent.ListenableFuture; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.dialogue.BinaryRequestBody; import com.palantir.dialogue.Channel; import com.palantir.dialogue.ConjureRuntime; @@ -43,6 +44,7 @@ public interface TestServiceAsync { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating @Nonnull ListenableFuture> getFileSystems(AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue index 126b15588..41a656624 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue @@ -1,6 +1,7 @@ package com.palantir.another; import com.google.errorprone.annotations.MustBeClosed; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.dialogue.BinaryRequestBody; import com.palantir.dialogue.Channel; import com.palantir.dialogue.ConjureRuntime; @@ -35,6 +36,7 @@ public interface TestServiceBlocking { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating @Nonnull Map getFileSystems(AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix index 57d990946..dc9738587 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix @@ -1,6 +1,7 @@ package test.prefix.com.palantir.another; import com.google.errorprone.annotations.MustBeClosed; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.dialogue.BinaryRequestBody; import com.palantir.dialogue.Channel; import com.palantir.dialogue.ConjureRuntime; @@ -35,6 +36,7 @@ public interface TestServiceBlocking { * Returns a mapping from file system id to backing file system configuration. * @apiNote {@code GET /catalog/fileSystems} */ + @Incubating @Nonnull Map getFileSystems(AuthHeader authHeader); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow b/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow index d51270be2..0be82bb55 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow +++ b/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow @@ -1,6 +1,7 @@ package com.palantir.another; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.palantir.conjure.java.undertow.lib.BinaryResponseBody; import com.palantir.conjure.java.undertow.lib.Deserializer; import com.palantir.conjure.java.undertow.lib.Endpoint; @@ -71,6 +72,8 @@ public final class TestServiceEndpoints implements UndertowService { } private static final class GetFileSystemsEndpoint implements HttpHandler, Endpoint { + private static final ImmutableSet TAGS = ImmutableSet.of("incubating"); + private final UndertowRuntime runtime; private final TestService delegate; @@ -83,6 +86,11 @@ public final class TestServiceEndpoints implements UndertowService { this.serializer = runtime.bodySerDe().serializer(new TypeMarker>() {}); } + @Override + public Set tags() { + return TAGS; + } + @Override public void handleRequest(HttpServerExchange exchange) throws IOException { AuthHeader authHeader = runtime.auth().header(exchange); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow.prefix index 021af3825..b75a02d11 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceEndpoints.java.undertow.prefix @@ -1,6 +1,7 @@ package test.prefix.com.palantir.another; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.palantir.conjure.java.undertow.lib.BinaryResponseBody; import com.palantir.conjure.java.undertow.lib.Deserializer; import com.palantir.conjure.java.undertow.lib.Endpoint; @@ -71,6 +72,8 @@ public final class TestServiceEndpoints implements UndertowService { } private static final class GetFileSystemsEndpoint implements HttpHandler, Endpoint { + private static final ImmutableSet TAGS = ImmutableSet.of("incubating"); + private final UndertowRuntime runtime; private final TestService delegate; @@ -83,6 +86,11 @@ public final class TestServiceEndpoints implements UndertowService { this.serializer = runtime.bodySerDe().serializer(new TypeMarker>() {}); } + @Override + public Set tags() { + return TAGS; + } + @Override public void handleRequest(HttpServerExchange exchange) throws IOException { AuthHeader authHeader = runtime.auth().header(exchange); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit b/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit index fda7a406c..e7f742ee8 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit +++ b/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit @@ -1,6 +1,7 @@ package com.palantir.another; import com.google.common.util.concurrent.ListenableFuture; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.product.AliasedString; import com.palantir.product.CreateDatasetRequest; import com.palantir.product.datasets.BackingFileSystem; @@ -35,6 +36,7 @@ public interface TestServiceRetrofit { */ @GET("./catalog/fileSystems") @Headers({"hr-path-template: /catalog/fileSystems", "Accept: application/json"}) + @Incubating ListenableFuture> getFileSystems(@Header("Authorization") AuthHeader authHeader); /** diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit.prefix index 8c54e2590..eb228419d 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceRetrofit.java.retrofit.prefix @@ -1,6 +1,7 @@ package test.prefix.com.palantir.another; import com.google.common.util.concurrent.ListenableFuture; +import com.palantir.conjure.java.lib.internal.Incubating; import com.palantir.ri.ResourceIdentifier; import com.palantir.tokens.auth.AuthHeader; import java.util.Collections; @@ -35,6 +36,7 @@ public interface TestServiceRetrofit { */ @GET("./catalog/fileSystems") @Headers({"hr-path-template: /catalog/fileSystems", "Accept: application/json"}) + @Incubating ListenableFuture> getFileSystems(@Header("Authorization") AuthHeader authHeader); /** diff --git a/conjure-lib/src/main/java/com/palantir/conjure/java/lib/internal/Incubating.java b/conjure-lib/src/main/java/com/palantir/conjure/java/lib/internal/Incubating.java new file mode 100644 index 000000000..1492922f3 --- /dev/null +++ b/conjure-lib/src/main/java/com/palantir/conjure/java/lib/internal/Incubating.java @@ -0,0 +1,42 @@ +/* + * (c) Copyright 2020 Palantir Technologies Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.palantir.conjure.java.lib.internal; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Signifies that a public API has not yet become stable, and may be subject to change. Projects that cannot quickly + * update based on their service dependencies cannot safely use {@link Incubating} APIs. + * + * This annotation is added to service methods which are tagged with {@code incubating}. + * For example: + *
{@code
+ * getFileSystems:
+ *   tags:
+ *     - incubating
+ *   http: GET /fileSystems
+ *   returns: map
+ * }
+ */ +@Retention(RetentionPolicy.CLASS) +@Target(ElementType.METHOD) +@Documented +public @interface Incubating {}