apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
28.94k stars 10.19k forks source link

upload properties by openapi can not upload note #5092

Closed pengbiaobeyond closed 3 months ago

pengbiaobeyond commented 4 months ago

upload properties by openapi can not upload note 应用openApi上传properties配置文件无法上传注释

dosubot[bot] commented 4 months ago

🤖

嘿,@pengbiaobeyond!很高兴再次见到你,希望你一切都好!

您无法通过openApi上传注释,是因为openApi没有提供上传注释的端点。

在提供的上下文中,ItemController类中有一个createComment方法,用于创建注释。然而,这个方法映射到端点/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/comment_items,并没有通过openApi暴露出来。

@PostMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/comment_items")
public ItemDTO createComment(@PathVariable("appId") String appId,
                      @PathVariable("clusterName") String clusterName,
                      @PathVariable("namespaceName") String namespaceName, @RequestBody ItemDTO dto) {
  // method implementation
}

如果想通过openApi上传注释,您需要暴露这个端点,或者在openApi中创建一个新的处理注释上传的端点。

源码参考:

至于为什么createComment方法没有通过openApi在Apollo仓库中暴露,我在仓库中没有找到答案,可能需要在其他地方寻找,或者我可能遗漏了一些信息。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

nobodyiam commented 4 months ago

@pengbiaobeyond 请描述具体的信息,如接口名、参数等,根据 OpenAPI 的使用文档,是可以传入注释的。

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 3 months ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.