Closed RaySmith-ttc closed 1 month ago
Hi,
could you also show the code for createDefaultPrimitiveTypeData()
?
Thank you!
Oh, right, I totally forgot that it's not built-in :) I have updated the issue.
Ah thanks, with the update to openapi 3.1 and schema-kenerator 1.4.2, swagger no longer uses the type
property but the types
.
So changing ...
schema.swagger.type = annotation.values["type"] as String
... to ...
schema.swagger.types = setOf(annotation.values["type"] as String)
... should fix the issue and produce the correct schema:
{
"root" : {
"$ref" : "#/components/schemas/io.github.smiley4.schemakenerator.test._ManualTests.Companion.Foo"
},
"componentSchemas" : {
"io.github.smiley4.schemakenerator.test._ManualTests.Companion.Foo" : {
"type" : "object",
"properties" : {
"value" : {
"type" : "number",
"format" : "#.########",
"title" : "BigDecimal"
}
},
"required" : [ "value" ],
"title" : "Foo"
}
}
}
Thank you!
The type of custom processors turns to null:
3.5.0:
3.5.1: