You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a custom spec filter to split our doc in public / non public api. And had hoped the „isRemovingUnreferencedDefinitions“ removes all references to then filtered $ref.
Sadly it filters also used refs from the oneOf annotation field.
Api Data Classes which use oneOf
data classApiSuggestionGroupsResponse(
@field:Schema(description = "Copy of used filterlist")
valquery:String?,
valsuggestionGroups:List<ApiSuggestionGroup>,
)
data classApiSuggestionGroup(
varid:String?,
valname:String?,
valtrackingName:String,
valmaxSuggestions:Int,
valsuggestions:List<ApiSuggestion>,
)
@JsonInclude(JsonInclude.Include.NON_NULL)
data classApiSuggestion(
varvalue:String? = null,
vartitle:String? = null,
varid:String? = null,
@field:Schema(description = "Included on category Suggestions")
vartextPrefix:String? = null,
varalias:String? = null,
varsubtitle:String? = null,
varicon:String? = null,
@field:Schema(
description = "Included on StandRegistration, Category and Entity “News” and “Coupon” suggestions", oneOf =
[ApiSuggestionCategoryAdditionalData::class, ApiSuggestionStandRegistrationAdditionalData::class, ApiSuggestionNewsAdditionalData::class, ApiSuggestionCouponAdditionalData::class]
)
varadditionalData:ApiSuggestionAdditionalData? = null,
varmarkSearchString:Boolean? = null,
)
@JsonTypeInfo(
use =JsonTypeInfo.Id.NAME,
include =JsonTypeInfo.As.PROPERTY,
property ="type"
)
sealedclassApiSuggestionAdditionalData
@JsonTypeName("category")
data classApiSuggestionCategoryAdditionalData(
@field:JsonProperty("isProductType")
varproductType:Boolean,
) : ApiSuggestionAdditionalData()
@JsonTypeName("standRegistration")
data classApiSuggestionStandRegistrationAdditionalData(
varorganizationAlias:String?,
varorganizationName:String?,
varhallAlias:String?,
varhallName:String?,
varstandAlias:String?,
varstandName:String?,
) : ApiSuggestionAdditionalData()
@JsonTypeName("news")
data classApiSuggestionNewsAdditionalData(
varexternalUrl:String,
) : ApiSuggestionAdditionalData()
@JsonTypeName("coupon")
data classApiSuggestionCouponAdditionalData(
varurl:String,
) : ApiSuggestionAdditionalData()
Used Version of Swagger-core: 2.2.27
Maybe a followup to: #3303
I created a custom spec filter to split our doc in public / non public api. And had hoped the „isRemovingUnreferencedDefinitions“ removes all references to then filtered $ref.
Sadly it filters also used refs from the oneOf annotation field.
Api Data Classes which use oneOf
Custom filter
Usage which links ApiSuggestionGroupsResponse from above and thus the oneOf attribute of ApiSuggestion.
The text was updated successfully, but these errors were encountered: