Add OpenAPI Documentation Extension for HTTP Workflow Triggers#80
Merged
sfmskywalker merged 4 commits intodevelop/3.6.0from Sep 13, 2025
Merged
Add OpenAPI Documentation Extension for HTTP Workflow Triggers#80sfmskywalker merged 4 commits intodevelop/3.6.0from
sfmskywalker merged 4 commits intodevelop/3.6.0from
Conversation
added 3 commits
August 28, 2025 10:48
- Implement IOpenApiGenerator and IWorkflowEndpointExtractor interfaces for OpenAPI documentation generation. - Create services for generating OpenAPI JSON and extracting workflow HTTP endpoints. - Add extension methods for configuring OpenAPI services and mapping endpoints. - Define HttpOpenApiOptions for configuration settings. - Introduce models for endpoint definitions and version retrieval. - Update project file with necessary dependencies and descriptions.
… enhance endpoint definition, and remove unused options class
… improve documentation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new OpenAPI documentation extension for Elsa workflows that automatically generates API documentation for HTTP workflow triggers. The extension provides workflow-aware OpenAPI 3.0 specifications with interactive ReDoc interface.
Key changes:
- Automatic endpoint discovery from workflow definitions with HTTP triggers
- OpenAPI 3.0 JSON generation service with workflow metadata integration
- Interactive ReDoc UI accessible at
/documentationendpoint
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WorkflowEndpointExtractor.cs | Extracts HTTP endpoints from workflows with metadata lookup |
| OpenApiGenerator.cs | Generates OpenAPI 3.0 JSON from endpoint definitions |
| ElsaVersionProvider.cs | Provides Elsa version detection from assembly attributes |
| EndpointDefinition.cs | Data model for HTTP endpoint with workflow metadata |
| Various extension files | Service registration, feature configuration, and endpoint mapping |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/modules/http/Elsa.Http.OpenApi/Services/WorkflowEndpointExtractor.cs
Outdated
Show resolved
Hide resolved
src/modules/http/Elsa.Http.OpenApi/Extensions/EndpointRouteBuilderExtensions.cs
Show resolved
Hide resolved
…tractor.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
This PR introduces a new
Elsa.Http.OpenApiextension module that automatically generates OpenAPI 3.0 documentation for HTTP endpoints exposed by Elsa workflows. The extension provides workflow-aware API documentation with interactive ReDoc interface.✨ Key Features
/documentationfor browsing and testing endpoints🏗️ Architecture
Core Components
IWorkflowEndpointExtractor: Service that extracts HTTP endpoints from workflows with metadata lookupIOpenApiGenerator: Service that generates OpenAPI 3.0 JSON specificationIElsaVersionProvider: Dedicated service for Elsa Core version detectionEndpointDefinition: Model representing HTTP endpoints with workflow metadataUsage