-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement JSON format documentation #3762
Conversation
I'll review it soon. Just one thing I saw is that there's In any case I'll review it this week. |
There's also #2777 . I'll take a look at both when I have some time. |
@asterite Support features below:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that a JSON doc output would be very useful, even if it ends up being implemented differently.
def initialize(src : {{src.id}}) | ||
{% for key, value in properties %} | ||
{% if value[:wrap] %} | ||
{% if value[:type].is_a?(Generic) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes that all Generic
types are Array(T)
. Wouldn't it be better to check this assumption? It also seems you use the wrap
property to get the generic type. You should be able to use type_vars[0]
to get this from the generic
.
This can be closed. #4746 has been merged with JSON output. |
Thank you for contribution @rosylilly and @straight-shoota |
In order to make it easy to extend the documentation, I think that we needed JSON format output.
The current documentation includes HTML, JS, CSS in the compiler. The more i try to make it rich, the more i should add unnecessary assets to the compiler.
Also, if you want to link class names between shards, there is currently no way to parse HTML.
I think that JSON documentation output can solve these problems, what do you think?
ref: #1834 (comment)