Skip to content

Conversation

@EvandroLG
Copy link
Owner

@EvandroLG EvandroLG commented Aug 10, 2025

This PR adds LDoc documentation for all Pegasus modules, covering both core functionality and plugins.

Resolves #140

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.
@EvandroLG EvandroLG requested a review from Copilot August 10, 2025 10:36
@EvandroLG EvandroLG self-assigned this Aug 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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)

EvandroLG and others added 3 commits August 10, 2025 20:32
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.
@EvandroLG EvandroLG merged commit a551ae0 into master Aug 11, 2025
0 of 6 checks passed
@EvandroLG EvandroLG deleted the docs/ldoc-annotations branch August 11, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lua language server annotations

2 participants