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
class DataSourceService[T <: TimeSeries, D <: DataSource[T]]
(implicit val system: ActorSystem[_], implicit val jsonFormat: RootJsonFormat[D]) extends HttpService {
I would like to do something like:
@Operation(summary = "Get the data source",
description = "Get the data source",
responses = Array(
new ApiResponse(responseCode = "200", description = "The data source",
content = Array(new Content(schema = new Schema(implementation = classOf[D])))
),
where D is my generic type.
Unfortunately, as (I suppose) I do this within an annotation, the compiler returns:
class type required but D found
[error] content = Array(new Content(schema = new Schema(implementation = classOf[D])))
[error] ^
I am looking for a workaround, any idea ?
The text was updated successfully, but these errors were encountered:
You might be better off writing the Open API spec by hand or using the Swagger Editor - it is normally better to write the API spec explicitly than to generate it.
I have a generic based HttpService
I would like to do something like:
where D is my generic type.
Unfortunately, as (I suppose) I do this within an annotation, the compiler returns:
I am looking for a workaround, any idea ?
The text was updated successfully, but these errors were encountered: