apollo icon indicating copy to clipboard operation
apollo copied to clipboard

upload properties by openapi can not upload note

Open pengbiaobeyond opened this issue 1 year ago • 2 comments

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

pengbiaobeyond avatar Feb 05 '24 03:02 pengbiaobeyond

🤖

嘿,@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.

dosubot[bot] avatar Feb 05 '24 03:02 dosubot[bot]

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

nobodyiam avatar Feb 07 '24 09:02 nobodyiam

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] avatar Mar 09 '24 10:03 stale[bot]

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.

stale[bot] avatar Mar 16 '24 23:03 stale[bot]