csharpfritz / csharpfritz/InstantAPIs

.WithTags("Nome of the API group");

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
453
Forks
58
PR merge metrics
No merged PRs in 30d

Description

This version can separate the apis by group? As when we use the .WithTags() parameter in out minimal apis, then Swagger group the routes above a title inside the .WithTags().

e.g:
app.MapInstantAPIs(config =>
{
config.IncludeTable(db => db.TABLE1, ApiMethodsToGenerate.All, "TABLE1")**.WithTags("GROUP TABLE 1")**;
});

app.MapInstantAPIs(config =>
{
config.IncludeTable(db => db.TABLE2, ApiMethodsToGenerate.All, "TABLE2")**.WithTags("GROUP TABLE 2")**;
});

Swagger will show something like this:

**GROUP TABLE 1**
[GET] /TABLE1
[POST] /TABLE1
[GET] /TABLE1/{id}
[PUT] /TABLE1/{id}
[DELETE] /TABLE1/{id}

**GROUP TABLE 2**
[GET] /TABLE2
[POST] /TABLE2
[GET] /TABLE2/{id}
[PUT] /TABLE2/{id}
[DELETE] /TABLE2/{id}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.