the idea is to develop the OpenAPI documentation directly in the controller Java files as JavaDoc, but then generate the OpenAPI - compatible format to expose as real documentation. This way, the JavaDoc will also serve and an official API documentation.
Also, it makes sense to carve out blocks of JavaDoc for this, such that if any content is outside such a block, it will not be part of the exposed API - this is necessary for internal comments, implementational detail, etc.