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
Currently, the openapi 2.0 spec returned at /openapi is statically set to /. When the Kafka-Bridge instance is behind a gateway and the gateway is taking requests at path e.g., /app/kafka-bridge and reverse-proxing to the bridge instance at path /, it would be more convenient if the returned openapi spec has basePath being set to /app/kafka-bridge instead of /, when the x-forwarded-prefix header of the request is available to derive the actual request path.
In this case, the client can, for example, issue a topics request at /app/kafka-bridge/topics instead of at /topics, knowing the correct basePath for this particular bridge instance.
This ticket is resulted from this preceding discussion #375 (comment)
The text was updated successfully, but these errors were encountered:
@elakito I have just noticed that basePath is something only supported by OpenAPI 2.0.
With OpenAPI 3.0, the new servers section is used.
Our plan is about getting rid of OpenAPI 2.0 specification soon, providing the 3.0 specification on the /openapi endpoint so I was wondering how much it makes really sense to do the change in the #433
@ppatierno if we are getting rid of openapiv2 any time soon, we won't need the v2 specific change. If we switch to return openapi(v3) at /openapi, we could either use a similar approach to overwrite the server's url between '/' or '/prefix-path' or simply use a variable notation '{basePath}' for that property and set its default value to '/' so that the consumer can decide on its value. For the latter case, we would just need a change in the spec file.
Currently, the openapi 2.0 spec returned at /openapi is statically set to
/
. When the Kafka-Bridge instance is behind a gateway and the gateway is taking requests at path e.g.,/app/kafka-bridge
and reverse-proxing to the bridge instance at path/
, it would be more convenient if the returned openapi spec hasbasePath
being set to/app/kafka-bridge
instead of/
, when thex-forwarded-prefix
header of the request is available to derive the actual request path.In this case, the client can, for example, issue a topics request at
/app/kafka-bridge/topics
instead of at/topics
, knowing the correctbasePath
for this particular bridge instance.This ticket is resulted from this preceding discussion
#375 (comment)
The text was updated successfully, but these errors were encountered: