Docs: add LDoc documentation across core and plugins#151
Merged
Conversation
Pegasus: module overview and server API docs Request/Response: document fields, methods, and usage; headers behavior and streaming Handler: lifecycle and plugin hooks Plugins: compress, downloads, files, router, tls annotated; options and behavior No functional changes.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive LDoc-style documentation to the Pegasus HTTP server codebase, covering both core modules and plugins. The documentation provides clear API definitions, type annotations, and usage examples to improve developer experience and code maintainability.
Key changes:
- Added module-level documentation headers for all files with descriptions and usage examples
- Annotated all public functions with parameter types, return values, and behavior descriptions
- Included type annotations using the Lua Language Server annotation format for better IDE support
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pegasus/response.lua | Added comprehensive documentation for HTTP response handling with method chaining examples |
| src/pegasus/request.lua | Documented HTTP request parsing and body handling methods |
| src/pegasus/plugins/tls.lua | Added TLS plugin documentation with SSL parameter configuration |
| src/pegasus/plugins/router.lua | Documented routing functionality with path parameters and hooks |
| src/pegasus/plugins/files.lua | Added static file serving documentation |
| src/pegasus/plugins/downloads.lua | Documented file download attachment functionality |
| src/pegasus/plugins/compress.lua | Added compression plugin documentation with streaming support details |
| src/pegasus/init.lua | Documented main Pegasus server class with configuration options |
| src/pegasus/handler.lua | Added internal handler documentation with plugin lifecycle details |
Comments suppressed due to low confidence (2)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Prepare LuaRocks spec for 1.0.9 release.
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.
This PR adds LDoc documentation for all Pegasus modules, covering both core functionality and plugins.
Resolves #140