Open haolingdong-msft opened 9 months ago
LGTM
If service does not want any generated doc, they would do this?
/**
* Some other custom Javadocs which shouldn't be overwritten as they aren't contained in the generated Javadoc block.
* <p>
* <!-- start generated doc -->
* <!-- end generated doc -->
*/
<!-- start generated doc -->
and <!-- end generated doc -->
is added by codegen. If there is no generated javadoc, we will not add it.
We can release a version with start/end but without update in partial-update logic, to refresh existing libs. Then another version with partial-update logic.
Yes, I plan to do so as well.
We can release a version with start/end but without update in partial-update logic, to refresh existing libs. Then another version with partial-update logic.
Do we plan to support multiple start and end tags?
For example, can this be supported?
/**
* Some other custom Javadocs which shouldn't be overwritten as they aren't contained in the generated Javadoc block.
* <p>
* <!-- start generated doc -->
* <!-- end generated doc -->
*
* Some more custom docs added in the middle.
*
* <!-- start generated doc -->
* <!-- end generated doc -->
*/
We will need to support partial update for class level javadoc.
We should also support partial update for all javadocs. We will have codesnippets added to javadocs of client methods too. So, we should support this wherever we have javadocs.
currently if service team remove the @Generated
annotation on client method, and update javadoc, we will keep the javadoc they updated. But at class level, it does not have @Generated
annotation, so we don't do the same thing.
We will need to support partial update for class level javadoc.
We should also support partial update for all javadocs. We will have codesnippets added to javadocs of client methods too. So, we should support this wherever we have javadocs.
client method issue here https://github.com/Azure/autorest.java/issues/2510
or you prefer we do them together?
Background
The customized class level javadoc is ignored and removed after next codegen. Link https://github.com/Azure/autorest.java/issues/2492
We will need to support partial update for class level javadoc. Similar as supporting partial-update on class's implemented types, we do not need to add
Generated
annotation to class, as this is ambiguous.Design
Instead of adding the
@Generated
annotation. I plan to use below syntax to specify the generated part of class level javadoc. And every codegen will overwrite the part between<!-- start generated doc -->
and<!-- end generated doc -->
to the newly generated one.This logic is applied in partial-update for
package-info.java
already, code.Link partial update on javadoc for client methods: https://github.com/Azure/autorest.java/issues/2510