Ballerina 记录类型的最佳 API 文档方法是什么?

问题描述 投票:0回答:1

考虑到以下选项,哪一种是 Ballerina 记录类型的推荐文档方法?

方法一:

# Provides extracted tools and service URL from the OpenAPI specification.
# 
# + serviceUrl - Extracted service URL from the OpenAPI specification if there is any
# + tools - Extracted Http tools from the OpenAPI specification
public type HttpApiSpecification record {|
   string serviceUrl?;
   HttpTool\[\] tools;
|};

方法2:

# Provides extracted tools and service URL from the OpenAPI
public type HttpApiSpecification record {|
   # Extracted service URL from the OpenAPI specification if there is any
   string serviceUrl?;
   # Extracted Http tools from the OpenAPI
   HttpTool\[\] tools;
|};
wso2 record ballerina api-documentation
1个回答
0
投票

建议采用方法 2。

您可以在这里找到更多详细信息。 https://ballerina.io/learn/generate-code-documentation/#write-ballerina-documentation

© www.soinside.com 2019 - 2024. All rights reserved.