|
29 | 29 | /** |
30 | 30 | * OpenAPI document annotations. |
31 | 31 | * <p> |
32 | | - * Declarative OpenAPI annotations do not model operation callbacks or top-level webhooks. Applications can contribute |
33 | | - * these items using a static OpenAPI document or an {@link io.helidon.openapi.spi.OpenApiDocumentSource}; Helidon |
34 | | - * composes those items with annotation-generated content. |
| 32 | + * Declarative OpenAPI annotations do not model operation callbacks or OpenAPI 3.1 and 3.2 top-level webhooks. To |
| 33 | + * describe a callback, use a static OpenAPI document or an {@link io.helidon.openapi.spi.OpenApiDocumentSource} that |
| 34 | + * defines the complete containing operation, and configure Helidon not to generate the same path and method from |
| 35 | + * annotations. A static document or document source can also define top-level webhooks. Combining static and generated |
| 36 | + * content uses {@link OpenApiGeneratedMode#MERGE MERGE} mode and requires non-conflicting content. |
35 | 37 | */ |
36 | 38 | @Api.Preview |
37 | 39 | @Api.Since("27.0.0") |
@@ -512,9 +514,11 @@ public enum Style { |
512 | 514 | * Complete OpenAPI path template for this operation. This is useful when the Helidon route template cannot be |
513 | 515 | * represented directly as an OpenAPI path. The value is not relative to the declarative HTTP path annotation. |
514 | 516 | * <p> |
515 | | - * This element configures only the path template; it does not configure Path Item Object metadata such as |
516 | | - * {@code $ref}, summary, description, or path-level servers. Contribute such metadata using a static OpenAPI |
517 | | - * document or an {@link io.helidon.openapi.spi.OpenApiDocumentSource}. |
| 517 | + * This element configures only the path template. Use a static OpenAPI document or an |
| 518 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource} to define Path Item Object summary, description, or |
| 519 | + * path-level servers. If a Path Item {@code $ref} accompanies locally generated fields, the referenced Path Item |
| 520 | + * must not define any of the same fields; otherwise the static document or document source must own the complete |
| 521 | + * Path Item and Helidon must not also generate the same path and method from annotations. |
518 | 522 | * <p> |
519 | 523 | * Path overrides must start with {@code /} and must declare the same path parameters as the generated route. |
520 | 524 | * Use simple OpenAPI path parameters such as {@code {id}}. Regex constraints, optional path segments, wildcards, |
@@ -605,8 +609,10 @@ public enum Style { |
605 | 609 | * locations are {@code path}, {@code query}, {@code header}, and {@code cookie}. Parameter-target usage cannot |
606 | 610 | * override the generated parameter location. |
607 | 611 | * <p> |
608 | | - * Declarative OpenAPI annotations do not support OpenAPI 3.2 {@code querystring} parameters. Use a static OpenAPI |
609 | | - * document or an {@link io.helidon.openapi.spi.OpenApiDocumentSource} to contribute such parameters. |
| 612 | + * Declarative OpenAPI annotations do not support OpenAPI 3.2 {@code querystring} parameters. To use one, define |
| 613 | + * the complete containing operation in a static OpenAPI document or an |
| 614 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource}, and configure Helidon not to generate the same path and |
| 615 | + * method from annotations. |
610 | 616 | * |
611 | 617 | * @return location |
612 | 618 | */ |
@@ -761,9 +767,10 @@ public enum Style { |
761 | 767 | /** |
762 | 768 | * HTTP status code in the range {@code 100..599}. A method can declare at most one response for each status. |
763 | 769 | * <p> |
764 | | - * This element supports exact status codes only. Use a static OpenAPI document or an |
765 | | - * {@link io.helidon.openapi.spi.OpenApiDocumentSource} to declare {@code default} or a wildcard response range |
766 | | - * ({@code 1XX} through {@code 5XX}). |
| 770 | + * This element supports exact status codes only. To declare {@code default} or a wildcard response range |
| 771 | + * ({@code 1XX} through {@code 5XX}), define the complete containing operation in a static OpenAPI document or an |
| 772 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource}, and configure Helidon not to generate the same path and |
| 773 | + * method from annotations. |
767 | 774 | * |
768 | 775 | * @return status code |
769 | 776 | */ |
@@ -892,8 +899,9 @@ public enum Style { |
892 | 899 | * OpenAPI Header Object metadata. |
893 | 900 | * <p> |
894 | 901 | * Declarative OpenAPI annotations do not model Header Object {@code example}, {@code examples}, or {@code explode} |
895 | | - * metadata. Use a static OpenAPI document or an {@link io.helidon.openapi.spi.OpenApiDocumentSource} to contribute |
896 | | - * such metadata. |
| 902 | + * metadata. To use such metadata, define the complete containing operation in a static OpenAPI document or an |
| 903 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource}, and configure Helidon not to generate the same path and |
| 904 | + * method from annotations. |
897 | 905 | */ |
898 | 906 | @Target({}) |
899 | 907 | @Retention(RetentionPolicy.CLASS) |
@@ -964,8 +972,10 @@ public enum Style { |
964 | 972 | * OpenAPI Media Type Object metadata. |
965 | 973 | * <p> |
966 | 974 | * Declarative OpenAPI annotations do not model {@code encoding} metadata, including per-part content types and |
967 | | - * headers, or OpenAPI 3.2 {@code prefixEncoding} and {@code itemEncoding}. Use a static OpenAPI document or an |
968 | | - * {@link io.helidon.openapi.spi.OpenApiDocumentSource} to contribute such metadata. |
| 975 | + * headers, or OpenAPI 3.2 {@code prefixEncoding} and {@code itemEncoding}. To use such metadata, define the complete |
| 976 | + * containing operation in a static OpenAPI document or an |
| 977 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource}, and configure Helidon not to generate the same path and |
| 978 | + * method from annotations. |
969 | 979 | */ |
970 | 980 | @Target({}) |
971 | 981 | @Retention(RetentionPolicy.CLASS) |
@@ -1095,7 +1105,9 @@ public enum Style { |
1095 | 1105 | * <p> |
1096 | 1106 | * Declarative OpenAPI annotations do not apply extensions to other OpenAPI objects, including servers, responses, |
1097 | 1107 | * headers, and links. Use a static OpenAPI document or an |
1098 | | - * {@link io.helidon.openapi.spi.OpenApiDocumentSource} to contribute such extensions. |
| 1108 | + * {@link io.helidon.openapi.spi.OpenApiDocumentSource} to define such extensions. If the extended object belongs to |
| 1109 | + * an operation, the static document or document source must own the complete operation and Helidon must not also |
| 1110 | + * generate the same path and method from annotations. |
1099 | 1111 | */ |
1100 | 1112 | @Target({ElementType.TYPE, ElementType.METHOD}) |
1101 | 1113 | @Retention(RetentionPolicy.CLASS) |
|
0 commit comments