Skip to content

Commit 2828747

Browse files
authored
Deprecate the use of @ExternalDocumentation on TYPE targets (microprofile#735)
Signed-off-by: Michael Edgar <michael@xlate.io>
1 parent 5357ab0 commit 2828747

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

api/src/main/java/org/eclipse/microprofile/openapi/annotations/ExternalDocumentation.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@
3131
* When it is applied to a method the value of the annotation is added to the corresponding OpenAPI operation
3232
* definition.
3333
* <p>
34-
* When it is applied to a type and one or more of the fields are not empty strings the annotation value is added to the
35-
* OpenAPI document root. If more than one non-empty annotation is applied to a type in the application or if the
36-
* externalDocs field of the OpenAPIDefinition annotation is supplied the results are not defined.
34+
* As of version 4.2 of the MicroProfile OpenAPI specification, use of this annotation on a type is deprecated. While
35+
* implementations may continue to provide the previously-specified support for setting the documentation in the OpenAPI
36+
* document root's {@code externalDocs} property from this annotation, that functionality is neither required nor
37+
* recommended by the MicroProfile OpenAPI specification. Developers are instead encouraged to use the
38+
* {@link OpenAPIDefinition#externalDocs() externalDocs} property of the {@link OpenAPIDefinition @OpenAPIDefinition}
39+
* directly.
3740
*
3841
* @see <a href= "https://spec.openapis.org/oas/v3.1.0.html#external-documentation-object">OpenAPI Specification
3942
* External Documentation Object</a>

spec/src/main/asciidoc/release_notes.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ A full list of changes delivered in the 4.2 release can be found at link:https:/
3333
==== Other Changes
3434

3535
* Add processing of Jakarta Bean Validation `@Digits` annotation (https://github.com/eclipse/microprofile-open-api/issues/717[717])
36+
* Deprecate the use of `@ExternalDocumentation` on `TYPE` targets (https://github.com/microprofile/microprofile-open-api/issues/725[725])
3637

3738

3839
[[release_notes_41]]

0 commit comments

Comments
 (0)