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

Add support for document comment in generated code #68

Open
desaikd opened this issue Nov 17, 2023 · 0 comments
Open

Add support for document comment in generated code #68

desaikd opened this issue Nov 17, 2023 · 0 comments
Labels
code generation Improvements for code generation subcommand `generate`

Comments

@desaikd
Copy link
Contributor

desaikd commented Nov 17, 2023

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 desaikd added the code generation Improvements for code generation subcommand `generate` label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code generation Improvements for code generation subcommand `generate`
Projects
Development

No branches or pull requests

1 participant