Skip to content

Commit

Permalink
0.0.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
goyounha11 committed Jul 23, 2024
1 parent ec2a78f commit 7773ce0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main/kotlin/com/goyounha11/docs/DocsUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ object DocsUtil {
description: String,
resultActions: ResultActions,
requestClazz: Class<*>? = null,
responseClazz: Class<*>? = null
responseClazz: Class<*>? = null,
requestSchema: String? = null,
responseSchema: String? = null
): RestDocumentationResultHandler {
val resourceSnippetParametersBuilder =
ResourceSnippetParametersBuilder().tags(tag).description(description)
Expand All @@ -55,6 +57,16 @@ object DocsUtil {
response.contentAsString.let { jacksonObjectMapper().readTree(it) }
val responseFieldDescriptors = createFieldDescriptors(responseNode, responseClazz?.kotlin)

resourceSnippetParametersBuilder.apply {
requestSchema?.let { schema ->
requestSchema(Schema(schema))
}

responseSchema?.let { schema ->
responseSchema(Schema(schema))
}
}

val requestParameter = createParameters(request, ParameterType.QUERY)
val requestPathParameter = createParameters(request, ParameterType.PATH)

Expand Down

0 comments on commit 7773ce0

Please sign in to comment.