478320 commented on code in PR #5685: URL: https://github.com/apache/shenyu/pull/5685#discussion_r1792720081
########## shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ApiServiceImpl.java: ########## @@ -126,11 +126,6 @@ private String update(final ApiDTO apiDTO) { tagRelationMapper.deleteByApiId(apiDO.getId()); tagRelationMapper.batchInsert(tags); } - if (ApiStateEnum.PUBLISHED.getState() == apiDO.getState()) { Review Comment: Hello, in order to realize that the user can directly use the api document after adding it in the visual operation interface, shenyu Gateway creates the default selector and rule when calling to create the api document, so the user can directly use the document for testing. But this also causes the api document to be coupled with selector and rule. To delete this part, users need to manually create the api document and test the need to manually add selector, rule, metadate, but solve the coupling problem of api and selector and rule. Users who use annotations such as @ShenyuGetMapping, as well as those who use swagger, will not be affected by the automatic creation of selectors and so on ########## shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ApiServiceImpl.java: ########## @@ -126,11 +126,6 @@ private String update(final ApiDTO apiDTO) { tagRelationMapper.deleteByApiId(apiDO.getId()); tagRelationMapper.batchInsert(tags); } - if (ApiStateEnum.PUBLISHED.getState() == apiDO.getState()) { Review Comment: When creating apidoc, this part determines whether the document is in the published state, and if the document is in the published state, the selector is registered, etc. If it is in the offline state, the corresponding selector content is deleted, which will lead to the coupling of apidoc and selector. Deleting this part can release their coupling. The removal of this feature will have the following effects, the document publication and logout will only be displayed as a status without additional functions, the document logout and online need to manually add and delete selectors and other content, for the creation of api documents, Users using @RequestMapping and other annotations and users using swagger will automatically create selectors and other content through annotations, which will not affect the convenience brought by automation. To add api documents in the visual interface, you need to manually create corresponding selector, rule, and Metadata. For the offline api docume nt, all users need to manually delete the corresponding selector, rule, and Metadata -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@shenyu.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org