Rest API
Baked uses ASP.NET Core for configuring and building a REST API application.
app.Layers.AddRestApi();
Configuration Targets
This layer provides ApiModel
and IApiModelConventionCollection
to generate
controllers from domain objects, IApplicationPartCollection
for registering
necessary application parts, MvcNewtonsoftJsonOptions
SwaggerGenOptions
,
SwaggerOptions
and SwaggerUIOptions
for configuring Swagger
behavior.
ApiModel
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigureApiModel(api =>
{
...
});
IApiModelConventionCollection
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigureApiModelConventions(conventions =>
{
...
});
IApplicationPartCollection
This target is provided in AddServices
phase. To configure it in a feature;
configurator.ConfigureApplicationParts(applicationParts =>
{
...
});
MvcNewtonsoftJsonOptions
This target is provided in AddServices
phase. To configure it in a feature;
configurator.ConfigureMvcNewtonsoftJsonOptions(options =>
{
...
});
SwaggerGenOptions
This target is provided in AddServices
phase right after
IApplicationPartCollection
. To configure it in a feature;
configurator.ConfigureSwaggerGenOptions(swaggerGenOptions =>
{
...
});
SwaggerOptions
This target is provided in AddServices
phase right after
SwaggerGenOptions
. To configure it in a feature;
configurator.ConfigureSwaggerOptions(swaggerOptions =>
{
...
});
SwaggerUIOptions
This target is provided in AddServices
phase right after
SwaggerOptions
. To configure it in a feature;
configurator.ConfigureSwaggerUIOptions(swaggerUIOptions =>
{
...
});