fix: uuid schema (#296)

This commit is contained in:
Ryan Brink
2022-08-16 09:01:22 -06:00
committed by GitHub
parent 99f5cb5b86
commit 8ae74705ba
4 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import io.kotest.assertions.json.shouldEqualJson
import io.kotest.assertions.throwables.shouldThrow
import io.kotest.core.spec.style.DescribeSpec
import kotlinx.serialization.json.Json
import java.util.UUID
class SchemaGeneratorTest : DescribeSpec({
describe("Scalars") {
@ -24,6 +25,9 @@ class SchemaGeneratorTest : DescribeSpec({
it("Can generate the schema for a String") {
jsonSchemaTest<String>("T0003__scalar_string.json")
}
it("Can generate the schema for a UUID") {
jsonSchemaTest<UUID>("T0017__scalar_uuid.json")
}
}
describe("Objects") {
it("Can generate the schema for a simple object") {

View File

@ -0,0 +1,4 @@
{
"type": "string",
"format": "uuid"
}