Documentation show an annotation for an extensions classes: right or wrong?

In the extension example in Implementing Binary Plugins, the extension property is annotated with @Input:

// Extension class to capture user input
class MyExtension {
    @Input
    String inputParameter = null
}

I think that is wrong. Annotations are supposed to be for Task properties only. Even the Input (Gradle API 8.13) javadoc says its for Tasks and does not mention extensions.

Source: gradle/platforms/documentation/docs/src/snippets/plugins/mappingExtensions/groovy/app/build.gradle at 881e969e9f5a529a9d82d934a76f159ac5331915 · gradle/gradle · GitHub

Besides that probably the whole part should be changed to use Property<String> instead of primitives, I’d say you are right, having it on the extension is most probably just no-op, unless the extension is also used somewhere as a @Nested property in which case it would become relevant again.

That is strange… why would the annotation be useful on a nested property when it is not necessary on a “non-nested” property?

Sorry, I was unclear.
@Nested property of a task I meant.