TongchengOpenSource / smart-doc

Smart-doc is a java restful api document generation tool. Smart-doc is based on interface source code analysis to generate interface documentation, completely zero-injection.
https://smart-doc-group.github.io/#/
Apache License 2.0
1.36k stars 267 forks source link

Suggestions for extensibility #840

Closed duanmourena closed 2 days ago

duanmourena commented 5 days ago

When using smart-doc for secondary encapsulation, there are several problems about extensibility, which have to cover the source code to be solved, and if these problems are solved, it will be a very perfect result

  1. Regarding the use of FrameworkEnum Template enumeration class, can you consider to change to the SPI-based way, convenient for users to define their own Template logic, the existing implementation of the target class fully qualified class name wrapped up, can not select the specified template.
  2. Regarding the isCollection method for determining collections in the JavaClassValidateUtil utility class, can we consider including the iterator java.lang.Iterable, which is also a member of the collection scene.
  3. About the configFile field in the abstract base class BaseDocsGeneratorMojo, can you adjust its scope to protected? When you need to add additional configuration, you can obtain the required configuration information through the configFile.
shalousun commented 3 days ago

@duanmourena The upcoming release 3.0.6 has provided support, and you can refer to the official documentation at https://smart-doc-group.github.io/guide/advanced/expand#other-framework-documentation-parsing-development-based-on-java-spi-since-3-0-6