ion-cli icon indicating copy to clipboard operation
ion-cli copied to clipboard

Add support for document comment in generated code

Open desaikd opened this issue 2 years ago • 0 comments

Following is a solution to add support for document comments for the generated code:

Add a code generation constraint that represent document comment. e.g.

Input Schema

type::{
    name: my_string, 
    type: string, 
    $code_gen_doc: "This is a string type"
}

Output generated code

/// This is a string type
struct MyString {
    value: String
}

desaikd avatar Nov 17 '23 22:11 desaikd