data-api-builder
data-api-builder copied to clipboard
[Bug]: Swagger UI shows duplicate entity groups for single entity definition
When using Data API builder 1.7.75, the Swagger UI generated at /api/openapi displays the Actor entity twice, even though Actor is defined only once in the configuration. No other entity shares its REST path or alias.
I think this has to do with
descriptions
Steps to Reproduce:
-
Use this configuration (trimmed for brevity):
{ "entities": { "Actor": { "source": { "object": "dbo.Actor", "type": "table" }, "rest": { "enabled": true, "path": "/Actor" } }, "Character": { "source": { "object": "dbo.Character", "type": "table" }, "rest": { "enabled": true, "path": "/Character" } }, "SeriesActors": { "source": { "object": "dbo.SeriesActors", "type": "view" }, "rest": { "enabled": true, "path": "/SeriesActors" } }, "GetSeriesActors": { "source": { "object": "dbo.GetSeriesActors", "type": "stored-procedure" }, "rest": { "enabled": true, "path": "/GetSeriesActors", "methods": ["post"] } } } } -
Start DAB (
dab start --config dab-config.json). -
Open the Swagger UI at
/api/openapi.
Expected Behavior: Each entity should appear once under its respective REST path group.
Actual Behavior:
Swagger shows two separate groups labeled Actor, each listing the same endpoints (GET, PUT, PATCH, DELETE, POST).
Environment:
- Data API builder version: 1.7.75
- Database: SQL Server
- Host: Azure Container Apps
- Authentication: StaticWebApps provider
Notes:
- No other entity defines
path: "/Actor". - The duplication persists even when unrelated entities (like stored procedures or views) are removed.
- Suggest investigating the Swagger document generator—likely a duplicate path or tag registration in
OpenApiDocumentBuilder.