Closed Machaing closed 3 years ago
The comparison of the generated document interfaces is as follows:
@Machaing, please read the smart-doc documentation to gain a detailed understanding of its implementation principles and to learn at which stage of the project lifecycle smart-doc generates documentation. Of course, if you have figured out an effective solution to address the issue you raised, feel free to provide a detailed implementation plan.
Expected Result
Expected: When the return type of an interface is a generic class with an inferred type "?", the generated documentation should be consistent with that of an accurately specified generic.
Current Result
The documentation generated for a generic class with an inferred type "?" is inconsistent with that of an accurately specified generic.
The following interface code mainly involves two almost identical interfaces, both returning a generic class but with different generic types. In terms of data returned when calling via Postman, the results are the same. However, the descriptions of the return fields in the generated interface documentation differ.
Code Example
Interface Class
APIResult Class
UserResp Class
Bug Impact Description
Inferred generic return classes should be considered for implementation, as they are allowed in actual calls.
Environment Used