
committed by
GitHub

parent
c8f64a50b0
commit
c50f7f7ccc
@ -5,6 +5,7 @@
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- Fixed sealed typed collections schema generation
|
||||||
|
|
||||||
### Remove
|
### Remove
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ object CollectionHandler : SchemaHandler {
|
|||||||
val collectionClass = collectionType.classifier as KClass<*>
|
val collectionClass = collectionType.classifier as KClass<*>
|
||||||
logger.debug("Obtained collection class: $collectionClass")
|
logger.debug("Obtained collection class: $collectionClass")
|
||||||
val referenceName = Helpers.genericNameAdapter(type, clazz)
|
val referenceName = Helpers.genericNameAdapter(type, clazz)
|
||||||
generateKTypeKontent(collectionType, cache)
|
|
||||||
val valueReference = when (collectionClass.isSealed) {
|
val valueReference = when (collectionClass.isSealed) {
|
||||||
true -> {
|
true -> {
|
||||||
val subTypes = gatherSubTypes(collectionType)
|
val subTypes = gatherSubTypes(collectionType)
|
||||||
@ -39,6 +38,7 @@ object CollectionHandler : SchemaHandler {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
false -> {
|
false -> {
|
||||||
|
generateKTypeKontent(collectionType, cache)
|
||||||
val schema = cache[collectionClass.simpleName] ?: error("${collectionClass.simpleName} not found")
|
val schema = cache[collectionClass.simpleName] ?: error("${collectionClass.simpleName} not found")
|
||||||
val slug = collectionClass.simpleName!!
|
val slug = collectionClass.simpleName!!
|
||||||
postProcessSchema(schema, slug)
|
postProcessSchema(schema, slug)
|
||||||
|
@ -60,10 +60,6 @@
|
|||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"FlibbityGibbit": {
|
|
||||||
"properties": {},
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"SimpleGibbit": {
|
"SimpleGibbit": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"a": {
|
"a": {
|
||||||
|
Reference in New Issue
Block a user