Last active
July 27, 2023 19:55
-
-
Save delagoya/93c2932d0d8ceeaf8f2d to your computer and use it in GitHub Desktop.
Avro IDL comments to Avrodoc example 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace("com.example") | |
/** | |
This is a comment for the whole protocol | |
*/ | |
protocol Example { | |
/** | |
The comment applies to the `NoSpaces` record, but is not indented to the | |
level of the record specification. | |
*/ | |
record NoSpaces { | |
/** This is a single line comment that is indented for readibility, | |
and is not effected by indentation. */ | |
string single_line_comment_property; | |
/** | |
This multi-line comment on `mult_line_property` that would be effected by indentation. | |
This is another paragraph | |
This is an indented block and should be shown as | |
such. | |
Here is a code block that apparently does not work for avrodoc. E.g. no [GFM](https://help.github.com/articles/github-flavored-markdown) support. | |
```ruby | |
# this is a Ruby code block | |
def method(arg1, arg2=nil) | |
puts "hello world!" | |
end | |
``` | |
*/ | |
string multi_line_property; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"protocol" : "Example", | |
"namespace" : "com.example", | |
"doc" : "This is a comment for the whole protocol", | |
"types" : [ { | |
"type" : "record", | |
"name" : "NoSpaces", | |
"doc" : "The comment applies to the `NoSpaces` record, but is not indented to the \nlevel of the record specification.", | |
"fields" : [ { | |
"name" : "single_line_comment_property", | |
"type" : "string", | |
"doc" : "This is a single line comment that is indented for readibility,\n and is not effected by indentation." | |
}, { | |
"name" : "multi_line_property", | |
"type" : "string", | |
"doc" : "This multi-line comment on `mult_line_property` that would be effected by indentation.\n\nThis is another paragraph\n\n \n This is an indented block and should be shown as \n such.\n\nHere is a code block that apparently does not work for avrodoc. E.g. no [GFM](https://help.github.com/articles/github-flavored-markdown) support.\n\n```ruby\n# this is a Ruby code block\ndef method(arg1, arg2=nil)\n puts \"hello world!\"\nend\n```" | |
} ] | |
} ], | |
"messages" : { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment