Skip to content

Commit e4c2c56

Browse files
committed
fix: update nullable fields
1 parent f79a618 commit e4c2c56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/kotlin/com/ctrlhub/core/datacapture/response/FormSchema.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import com.github.jasminb.jsonapi.annotations.Type
44

55
@Type("form-schemas")
66
data class FormSchema (
7-
val id: String,
8-
val rawSchema: String,
7+
val id: String? = null,
8+
val rawSchema: String? = null,
99
)

src/test/kotlin/com/ctrlhub/core/datacapture/FormSchemasRouterTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class FormSchemasRouterTest {
4343
assertEquals(1, response.data.size)
4444
val formSchema = response.data[0]
4545
assertEquals("1.0.0", formSchema.id)
46-
assertTrue(formSchema.rawSchema.isNotEmpty())
46+
assertTrue(formSchema.rawSchema?.isNotEmpty() ?: false)
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)