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
Scripting: capture structured javadoc from stdlib #68782
Scripting: capture structured javadoc from stdlib #68782
Conversation
Clean javadoc tags and strip html. Methods and constructors have an optional `javadoc` field. All fields under `javadoc` are optional but at least one will be present. Fields also have optional `javadoc` field which, if present, is a string. ``` "javadoc": { "description": "...", // from @param <param name> <param description> "parameters": { "p1": "<p1 description>", "p2": "<p2 description>" }, // from @return "return": "...", // from @throws <type> <description> "throws": [ [ "IndexOutOfBoundsException", "<description>" ], [ "IOException", "<description>" ] ] } ```
Pinging @elastic/es-core-infra (Team:Core/Infra) |
6149747
to
2808682
Compare
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.
LGTM! Nice update.
@@ -77,13 +77,15 @@ dependencies { | |||
docImplementation project(':server') | |||
docImplementation project(':modules:lang-painless') | |||
docImplementation 'com.github.javaparser:javaparser-core:3.18.0' | |||
docImplementation 'org.jsoup:jsoup:1.13.1' |
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.
What's this do?
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.
It's used to clean html tags.
ParsedJavadoc parsed = new ParsedJavadoc(cleaned(cleaned)); | ||
for (JavadocBlockTag tag: tags) { | ||
String tagName = tag.getTagName(); | ||
// https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags |
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.
Did you intend to link to Java 7 for this comment?
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.
Updated to java14.
…ing/jdk-src-parse-05-clean-at
Clean javadoc tags and strip html. Methods and constructors have an optional `javadoc` field. All fields under `javadoc` are optional but at least one will be present. Fields also have optional `javadoc` field which, if present, is a string. ``` "javadoc": { "description": "...", // from @param <param name> <param description> "parameters": { "p1": "<p1 description>", "p2": "<p2 description>" }, // from @return "return": "...", // from @throws <type> <description> "throws": [ [ "IndexOutOfBoundsException", "<description>" ], [ "IOException", "<description>" ] ] } ``` Backport: c35eebe
* Scripting: capture structured javadoc from stdlib (#68782) Clean javadoc tags and strip html. Methods and constructors have an optional `javadoc` field. All fields under `javadoc` are optional but at least one will be present. Fields also have optional `javadoc` field which, if present, is a string. ``` "javadoc": { "description": "...", // from @param <param name> <param description> "parameters": { "p1": "<p1 description>", "p2": "<p2 description>" }, // from @return "return": "...", // from @throws <type> <description> "throws": [ [ "IndexOutOfBoundsException", "<description>" ], [ "IOException", "<description>" ] ] } ``` Backport: c35eebe
Clean javadoc tags and strip html. Methods and constructors have an optional `javadoc` field. All fields under `javadoc` are optional but at least one will be present. Fields also have optional `javadoc` field which, if present, is a string. ``` "javadoc": { "description": "...", // from @param <param name> <param description> "parameters": { "p1": "<p1 description>", "p2": "<p2 description>" }, // from @return "return": "...", // from @throws <type> <description> "throws": [ [ "IndexOutOfBoundsException", "<description>" ], [ "IOException", "<description>" ] ] } ```
Clean javadoc tags and strip html.
Methods and constructors have an optional
javadoc
field. All fields underjavadoc
are optional but at least one will be present.Fields also have optional
javadoc
field which, if present, is a string.