考虑到以下选项,哪一种是 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;
|};
建议采用方法 2。
您可以在这里找到更多详细信息。 https://ballerina.io/learn/generate-code-documentation/#write-ballerina-documentation