Describe the bug
We are running a Kotlin application with spring-boot-starter-data-rest and spring-boot-starter-data-jpa.
Spring Boot version 4.1.0
Springdoc version 3.1.0
Some entity classes have embedded properties. These properties are missing in the corresponding Open API schema definitions.
Example:
@Entity
class Person {
@Id
var id: Long? = null
@Embedded
var name: Name? = null
}
@Embeddable
class Name {
var firstName: String? = null
var lastName: String? = null
}
Springdoc 3.0.2 works as expected and generates
...
"components": {
"schemas": {
"EntityModelPerson": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"links": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Link"
}
},
"name": {
"$ref": "#/components/schemas/Name"
}
}
},
...
With Springdoc 3.1.0 both name property and Name object schema are missing.
(Note: Springdoc 3.0.3 doesn't work because of #3263)
To Reproduce
See https://github.com/obecker/springdoc-issue-demo
Run the main function in SpringdocIssueDemoApplication and open http://localhost:8080/swagger-ui/index.html
Downgrade the springdoc version in build.gradle.kts to see the old behavior.
Describe the bug
We are running a Kotlin application with spring-boot-starter-data-rest and spring-boot-starter-data-jpa.
Spring Boot version 4.1.0
Springdoc version 3.1.0
Some entity classes have embedded properties. These properties are missing in the corresponding Open API schema definitions.
Example:
Springdoc 3.0.2 works as expected and generates
With Springdoc 3.1.0 both
nameproperty andNameobject schema are missing.(Note: Springdoc 3.0.3 doesn't work because of #3263)
To Reproduce
See https://github.com/obecker/springdoc-issue-demo
Run the
mainfunction inSpringdocIssueDemoApplicationand open http://localhost:8080/swagger-ui/index.htmlDowngrade the springdoc version in
build.gradle.ktsto see the old behavior.