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 may or may not be correct but the ArraySchema annotation now has items() and schema() but they both have the same Javadoc. I assume that items() is meant to be a synonym for schema() but is less ambiguously named. items() is a recent addition.
I have a test case in Scala where I use an ArraySchema annotation to override the item implementation. I have 2 variants. One that uses schema and the other that uses items but the override only works with schema.
Thanks for reporting this. It looks like a bug introduced while implementing support for OpenAPI 3.1, as ArraySchema.schema already represents the schema of the items in the array, and ArraySchema.items is a duplicate that has been only processed in terms of types and only in case of OpenAPI 3.1.
#4611 deprecates ArraySchema.items for future removal, adding support for OAS 3.1 types by processing existing schema field.
I may or may not be correct but the ArraySchema annotation now has
items()
andschema()
but they both have the same Javadoc. I assume thatitems()
is meant to be a synonym forschema()
but is less ambiguously named.items()
is a recent addition.See https://docs.swagger.io/swagger-core/v2.2.20/apidocs/io/swagger/v3/oas/annotations/media/ArraySchema.html
I have a test case in Scala where I use an ArraySchema annotation to override the item implementation. I have 2 variants. One that uses
schema
and the other that usesitems
but the override only works withschema
.I'm using swagger 2.2.20.
The 2 classes are in:
https://github.com/swagger-akka-http/swagger-scala-module/blob/develop/src/test/scala/models/AddRequest.scala
The AddRequestOldStyleAnnotation variant works as expected when I run it through the swagger-core ModelResolver.
I suspect that this line is at fault
swagger-core/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java
Line 166 in 0d067d0
Note how it only looks at the
schema
value and not theitems
value.The text was updated successfully, but these errors were encountered: