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
Dynamic client proxies (c# and js) relies on an endpoint on the server that is provided by the ABP Framework: api/abp/api-definition.
That endpoint returns a model of HTTP APIs provided from the server application. In this way, dynamic client proxies can understand how to call them.
Another great ABP feature is Auto API Controllers, which exposes your application services as HTTP APIs.
These two system works great normally, but it can't work for MVC-tiered applications. Consider that scenario:
In this case, MVC website application's api/abp/api-definition endpoint can not return APIs provided by the Backend HTTP API application, because these APIs are not available in the process of the MVC website application. To make that possible, we currently should define proxy controllers (example). In this way, MVC website application can have these APIs and api/abp/api-definition returns all the APIs. In practical, application services are hosted in the Backend HTTP API application, so the controllers actually injects dynamic c# proxies of the target app services. Finally, the Backend HTTP API application has the real implementation of the app services.
With this issue, I want to create a way of returning Backend HTTP API endpoint from the api/abp/api-definition endpoint of the MVC websites application (by somehow getting the api definition of the backend and merging with its own api-definitions). This even makes possible to create simple API gateways. In this case, we still need to a redirection of requests to the backend API, maybe using a middleware or API gateway library like Ocelot. One drawback is when we open Swagger UI in the MVC app, we can't see the APIs of the backend app, but this is already like that if we don't use the ABP Framework.
The text was updated successfully, but these errors were encountered:
Dynamic client proxies (c# and js) relies on an endpoint on the server that is provided by the ABP Framework: api/abp/api-definition.
That endpoint returns a model of HTTP APIs provided from the server application. In this way, dynamic client proxies can understand how to call them.
Another great ABP feature is Auto API Controllers, which exposes your application services as HTTP APIs.
These two system works great normally, but it can't work for MVC-tiered applications. Consider that scenario:
JS client ---> MVC website application ---> Backend HTTP API application
In this case, MVC website application's
api/abp/api-definition
endpoint can not return APIs provided by the Backend HTTP API application, because these APIs are not available in the process of the MVC website application. To make that possible, we currently should define proxy controllers (example). In this way, MVC website application can have these APIs andapi/abp/api-definition
returns all the APIs. In practical, application services are hosted in the Backend HTTP API application, so the controllers actually injects dynamic c# proxies of the target app services. Finally, the Backend HTTP API application has the real implementation of the app services.With this issue, I want to create a way of returning Backend HTTP API endpoint from the
api/abp/api-definition
endpoint of the MVC websites application (by somehow getting the api definition of the backend and merging with its own api-definitions). This even makes possible to create simple API gateways. In this case, we still need to a redirection of requests to the backend API, maybe using a middleware or API gateway library like Ocelot. One drawback is when we open Swagger UI in the MVC app, we can't see the APIs of the backend app, but this is already like that if we don't use the ABP Framework.The text was updated successfully, but these errors were encountered: