Azure / Azure/data-api-builder

[Enh]: The `info.description` field in the OpenAPI output is never populated.

Offen
#3,702 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @souvikghosh04 Auf GitHub ansehen
cri open-api
Vorherrschende Sprache
C#
Sterne
1.5k
Forks
370
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
9

Beschreibung

## Summary

The `info.description` field in the generated OpenAPI document is never populated.

DAB already supports a server-level description through `runtime.mcp.description`. Use this value to populate `OpenApiInfo.Description` when building the OpenAPI document.

## Desired behavior

When `runtime.mcp.description` is configured, pass its value to `OpenApiInfo.Description` in `BuildOpenApiDocument`.

### Single configuration

```json
{
"runtime": {
"mcp": {
"description": "This server provides access to the company database."
}
}
}
```

### Expected OpenAPI output

```json
{
"info": {
"title": "Data API builder - REST Endpoint",
"version": "1.0.0",
"description": "This server provides access to the company database."
}
}
```

## Multiple configurations

When DAB uses multiple configuration files, use `runtime.mcp.description` from the top-level configuration.

The combined runtime produces one OpenAPI document, so it should also have one description. Runtime settings from child configuration files should not contribute separate descriptions.

### Top-level configuration

```json
{
"data-source-files": [
"sales.json",
"inventory.json"
],
"runtime": {
"mcp": {
"description": "This server provides access to company sales and inventory data."
}
}
}
```

### Expected OpenAPI output

```json
{
"info": {
"title": "Data API builder - REST Endpoint",
"version": "1.0.0",
"description": "This server provides access to company sales and inventory data."
}
}
```

## Current behavior

`runtime.mcp.description` is available in the DAB configuration and is used as the MCP server description, but `OpenApiInfo.Description` is never set.

As a result, the description is available to MCP clients but omitted from the generated OpenAPI document.

## Recommendation

Set `OpenApiInfo.Description` to the resolved top-level `runtime.mcp.description` value in `BuildOpenApiDocument`.

Do not introduce a separate `runtime.rest.openapi-description` property. Using the existing MCP description avoids duplicate configuration and provides one consistent description for the server across MCP and OpenAPI.
****

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.