Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Documentation comments in samples doesn't follow proper documentation guidlines #9070

Open
jsdjayanga opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
Area/LearnPages Issues related to all the pages of the Learn section. Category/Content All written content related issues (Technical content, english language etc) Kind/DevTools Type/Improvement Improvements required on the website.

Comments

@jsdjayanga
Copy link

jsdjayanga commented Jun 13, 2024

Description

The documentation guidelines in https://ballerina.io/learn/style-guide/annotations-documentation-and-comments/#documentation is not followed in sample codes given in https://ballerina.io/learn/test-ballerina-code/mocking/#create-a-test-double

This has to be corrected in all the samples.

Describe your problem(s)

// This function performs a `get` request to the Chuck Norris API and returns a random joke 
// with the name replaced by the provided name or an error if the API invocation fails.
function getRandomJoke(string name) returns string|error {
    Joke joke = check clientEndpoint->get("/random");
    string replacedText = re `Chuck Norris`.replaceAll(joke.value, name);
    return replacedText;
}

Describe your solution(s)

\# This function performs a `get` request to the Chuck Norris API and returns a random joke .
\#
\# \+ name - The name to replace in the joke.
\# \+ return - A random joke with the name replaced by the provided name or an error if the API invocation fails.
function getRandomJoke(string name) returns string|error {
    Joke joke = check clientEndpoint->get("/random");
    string replacedText = re `Chuck Norris`.replaceAll(joke.value, name);
    return replacedText;
}

Related area

-> Other Area

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@jsdjayanga jsdjayanga added the Type/Improvement Improvements required on the website. label Jun 13, 2024
@nipunayf nipunayf transferred this issue from ballerina-platform/ballerina-lang Jun 13, 2024
@anupama-pathirage anupama-pathirage added Area/LearnPages Issues related to all the pages of the Learn section. Category/Content All written content related issues (Technical content, english language etc) Kind/DevTools labels Aug 20, 2024
@anuruddhal anuruddhal added this to the Documentation - M6 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/LearnPages Issues related to all the pages of the Learn section. Category/Content All written content related issues (Technical content, english language etc) Kind/DevTools Type/Improvement Improvements required on the website.
Projects
Status: Backlog
Development

No branches or pull requests

4 participants