Skip to content

Commit ee412fd

Browse files
committed
use the correct property name (#238)
1 parent 6a99922 commit ee412fd

File tree

2 files changed

+5
-5
lines changed
  • openapi-processor-core/src
    • main/kotlin/io/openapiprocessor/core/writer/java
    • testInt/resources/tests/javadoc/outputs/model/record

2 files changed

+5
-5
lines changed

openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/writer/java/JavaDocWriter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import org.commonmark.renderer.html.HtmlRenderer
2222
/**
2323
* Do not wrap the top level items in (unwanted) paragraphs.
2424
*/
25-
class SkipParentWrapperParagraphsRenderer(val context: HtmlNodeRendererContext)
25+
class SkipParentWrapperParagraphsRenderer(context: HtmlNodeRendererContext)
2626
: CoreHtmlNodeRenderer(context), NodeRenderer {
2727

2828
override fun getNodeTypes(): Set<Class<out Node>> {
@@ -67,11 +67,11 @@ open class JavaDocWriter(val identifier: Identifier) {
6767
comment += "\n"
6868

6969
endpoint.parameters.forEach {
70-
comment += convert(it.description, "@param ${identifier.toCamelCase (it.name)}")
70+
comment += convert(it.description, "@param ${identifier.toIdentifier (it.name)}")
7171
}
7272

7373
endpoint.requestBodies.forEach {
74-
comment += convert(it.description, "@param ${identifier.toCamelCase (it.name)}")
74+
comment += convert(it.description, "@param ${identifier.toIdentifier (it.name)}")
7575
}
7676

7777
val response = convert(endpointResponse.description, "@return")
@@ -101,7 +101,7 @@ open class JavaDocWriter(val identifier: Identifier) {
101101
}
102102

103103
dataType.forEach { p, dt ->
104-
comment += convert(dt.documentation!!.description, "@param ${identifier.toCamelCase (p)}")
104+
comment += convert(dt.documentation!!.description, "@param ${identifier.toIdentifier (p)}")
105105
}
106106

107107
return wrap(comment)

openapi-processor-core/src/testInt/resources/tests/javadoc/outputs/model/record/Foo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* this is the <em>Foo</em> schema description
88
*
99
* @param fooBar <em>property</em> description
10-
* @param enum enum <em>property</em> description
10+
* @param aEnum enum <em>property</em> description
1111
*/
1212
@Generated(value = "openapi-processor-core", version = "test")
1313
public record Foo(

0 commit comments

Comments
 (0)