-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hi
I'm trying to develop a component which exposes its own API as defined in the swagger model, but for a couple of endpoints has to call an external service, and expose directly the results from it, acting as a sort of proxy.
Is it that possible using the api-first-hand plugin?
I mean: I expected to be able to use a definition similar to the following one:
"/items":
get:
operationId: "listOfItems"
produces:
- "application/json"
responses:
200:
schema:
type: object
But it will produce a case class ItemsGetResponses200()
"empty" (no fields).
Using AnyValue
, object
or {}
object schema, I always get the same behaviour.
Is there maybe a default model I could use here?
I'm fine declaring models first, but for this case only I really can't: I have to put the data in the response as they were from the external service, and still declare at least the endpoint and its parameters for swagger.
Does anybody has any idea on how to accomplish that? tanks in advance
Alfredo