Skip to content

Commit e15b3de

Browse files
committed
refactor : Modified to display enum values more clearly.
1 parent 9b87a24 commit e15b3de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/src/main/kotlin/io/wwan13/api/document/snippets/DocumentField.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ infix fun <T : Enum<T>> String.isTypeOf(enumType: ENUM<T>): DocumentField {
1111
return DocumentField(
1212
identifier = this,
1313
type = enumType,
14-
enumValues = " (${enumType.entries.joinToString(", ")})"
14+
enumValues = enumType.entries.toString()
1515
)
1616
}
1717

@@ -28,12 +28,12 @@ data class DocumentField(
2828
val type: FieldType,
2929
var description: String = "",
3030
var required: Boolean = true,
31-
val enumValues: String? = null
31+
val enumValues: String = ""
3232
) {
3333
fun toFieldDescriptor(): FieldDescriptor {
3434
val descriptor = PayloadDocumentation.fieldWithPath(identifier)
3535
.type(type.value)
36-
.description(description + enumValues)
36+
.description(description)
3737
if (!required) {
3838
descriptor.optional()
3939
}

0 commit comments

Comments
 (0)