Configuring API Framework
There's multiple ways of configuring API Framework. This section introduced how API Framework can be configured using code, appsettings.json and using REST.
After adding API Framework into your ASP.NET Core application, the API Framework needs to be configured. Main things to configure are the APIs and the Endpoints.
API Framework has a built-in configuration support for the following methods:
- Code
- JSON-configuration
- REST
The best way depends on the project. For some cases, where things don't change often, the code based approach can be the quickest and simples. Everything is added through Startup.cs's ConfigureServices.
If you need more flexibility and the option of changing things without having to rebuild and publish a newer versio, configuration though a JSON-based configuration file can be used. The JSON-file was the first supported way of configuring API Framework and given its combination of flexibility and easy-to-use, it's the ideal choice for many projects.
It is also possible to configure the APIs and the endpoints using the REST endpoints provided by the API Framework's Admin-package.