swagger-core
swagger-core copied to clipboard
Can i controller schema order with same property?
Is your feature request related to a problem? Please describe. I have below use case
- using replaceWithSchema at configuration
init {
SpringDocUtils
.getConfig()
.replaceWithSchema(
UserId::class.java,
Schema<UserId>().apply {
description = "default description"
type = "integer"
}
)
}
- because this type is so widely using, so i want to apply common schema by type
- but sometimes i need to override schema because it need more detail description
data class TwoUserIds(
val userId: UserId,
@Schema(description = "detail description", type = "integer")
val otherUserId: UserId
)
but i couldn't find a way to control annotation processing order.
Describe the solution you'd like
- add some property to control annotation process order (maybe filed name is order?)
- Alternatively, annotation that having detail scope may impliclity applied later
I asked same question at springdoc/springdoc-openapi#1757 but they said it is part of swagger-core 🙏