Skip to content

Add openapi support#1146

Merged
Aaronontheweb merged 7 commits into
netclaw-dev:devfrom
codymullins:add-openapi-support
May 22, 2026
Merged

Add openapi support#1146
Aaronontheweb merged 7 commits into
netclaw-dev:devfrom
codymullins:add-openapi-support

Conversation

@codymullins

Copy link
Copy Markdown
Contributor

Adds OpenAPI support, including updating Minimal API Endpoints to use TypedResults. This will facilitate letting agents interact with the API directly, including autogenerating an API client using Refitter for the Management UI.

OpenAPI document will be available at http://localhost:5199/openapi/v1.json

NOTE: I added warnings to the ignore list for the Daemon - these pop up because the default warning for public types when generating docs is very strict. I personally don't like this to be a warning or a failure, but happy to defer to you here.

Sample of what this looks like:
image

Copilot AI review requested due to automatic review settings May 22, 2026 15:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds OpenAPI document generation for the Netclaw daemon and updates multiple Minimal API endpoints to use TypedResults + named/tagged operations so OpenAPI clients (e.g., Refitter) can be generated reliably.

Changes:

  • Register and expose an OpenAPI document endpoint (AddOpenApi / MapOpenApi).
  • Convert several endpoints to typed Results<...> return types and replace anonymous JSON payloads with explicit request/response records.
  • Add OpenAPI metadata (WithName, WithSummary, WithTags) across the daemon API surface.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Netclaw.Daemon/Webhooks/WebhookEndpointRouteBuilderExtensions.cs Convert webhook endpoint to typed results + explicit response DTOs and add OpenAPI metadata.
src/Netclaw.Daemon/Security/PairingEndpointRouteBuilderExtensions.cs Convert pairing endpoints to typed results + explicit response DTOs and add OpenAPI metadata.
src/Netclaw.Daemon/Reminders/ReminderEndpointRouteBuilderExtensions.cs Convert reminder endpoints to typed results + explicit DTOs and add OpenAPI metadata.
src/Netclaw.Daemon/Providers/ProviderOAuthEndpointRouteBuilderExtensions.cs Add typed query/response models and OpenAPI metadata for provider OAuth endpoints.
src/Netclaw.Daemon/Mcp/McpEndpointRouteBuilderExtensions.cs Add typed query/response models, typed results, and OpenAPI metadata for MCP endpoints.
src/Netclaw.Daemon/Lifecycle/LifecycleEndpointRouteBuilderExtensions.cs Add typed query/response models, typed results, and OpenAPI metadata for lifecycle shutdown endpoint.
src/Netclaw.Daemon/Configuration/MattermostActionEndpointExtensions.cs Convert Mattermost callback endpoint to typed results and add OpenAPI metadata.
src/Netclaw.Daemon/Program.cs Register OpenAPI services and map OpenAPI endpoint; add OpenAPI metadata to health/stats endpoints.
src/Netclaw.Daemon/Netclaw.Daemon.csproj Enable XML doc generation and suppress doc-comment diagnostics to support OpenAPI metadata.
Directory.Packages.props Add central package version for Microsoft.AspNetCore.OpenApi.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Netclaw.Daemon/Program.cs Outdated
Comment thread Directory.Packages.props
@Aaronontheweb Aaronontheweb added the UX/DX UI / UX / DX friction issue or user-facing annoyances. label May 22, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) May 22, 2026 16:50
@Aaronontheweb Aaronontheweb merged commit 2c33d9d into netclaw-dev:dev May 22, 2026
14 checks passed
@codymullins codymullins deleted the add-openapi-support branch May 22, 2026 17:22
@Aaronontheweb Aaronontheweb mentioned this pull request May 26, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX/DX UI / UX / DX friction issue or user-facing annoyances.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants