Ballerina - Ballerina 记录数据类型的最佳文档注释方法是什么

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

对于 Ballerina 记录数据类型,推荐的文档注释方法是什么?

方法1

# 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 comments record ballerina
1个回答
0
投票

建议采用方法 2。

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

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