swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

oneOf, anyOf, allOf support? #219

Open DenisNovac opened 4 years ago

DenisNovac commented 4 years ago

Is there an oneOf, anyOf, etc support (https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/) in ApiResponses annotation? For example, i want to return one of two schemas with the same code:

@ApiResponses(Array (
  new ApiResponse(code = 200, message = "O", response = classOf[MyClass]),
  new ApiResponse(code = 200, message = "", response = classOf[MySecondClass])
))

This code makes swager.yml with only last response model.

gaeljw commented 3 years ago

This is OpenApiSpec 3.0 which is not yet supported by this project.

Related to #159