Skip to content

Added project documentation#17

Merged
stixx merged 2 commits intomainfrom
documentation
Mar 1, 2026
Merged

Added project documentation#17
stixx merged 2 commits intomainfrom
documentation

Conversation

@stixx
Copy link
Owner

@stixx stixx commented Mar 1, 2026

Summary by CodeRabbit

  • Documentation
    • Added comprehensive README for the OpenAPI Command Bundle with features, installation, usage examples, and configuration.
    • Added command-routing guide detailing OpenAPI-driven routing, request lifecycle, routing discovery, customization, and migration notes.
    • Added OpenAPI integration guide covering attribute-based endpoints, NelmioApiDoc integration, autogenerated docs, and problem-details models.
    • Added validation guide covering validation behavior, configuration, error mapping, and RFC 7807 Problem Details responses.

@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Walkthrough

Adds comprehensive documentation for the OpenAPI Command Bundle across four files, covering installation, usage examples, OpenAPI-driven routing via attributes, Nelmio/Swagger integration, request lifecycle, validation, and RFC 7807 problem details.

Changes

Cohort / File(s) Summary
Bundle Overview
README.md
New README documenting purpose, key features (OpenAPI-driven routing, automatic deserialization/validation, Messenger integration, auto-generated docs, RFC 7807 handling), installation, usage examples (command DTOs, handler, curl), and configuration options.
Technical Documentation
docs/command-routing.md, docs/openapi.md, docs/validation.md
Three new docs detailing OpenAPI-driven command routing, command-to-route mapping, request lifecycle, NelmioApiDoc/Swagger integration, supported OpenAPI attributes, problem details (RFC 7807) behavior, validation configuration, examples, migration notes, and troubleshooting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hopped through docs both bright and new,
I found routes in attributes, tidy and true,
Validation snug, problems handled with care,
Commands dispatched lightly through open-air,
A carrot of docs—read, run, and share! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Added project documentation' accurately describes the main change: four new documentation files were added (README.md, command-routing.md, openapi.md, validation.md) totaling 702 lines of documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch documentation

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/command-routing.md`:
- Line 79: Update the phrase "During the normal route building process, we
automatically scan your project’s `%kernel.project_dir%/src` directory and add
routes for command classes that meet the criteria: have class-level OpenAPI
operation attributes (e.g., `#[OA\Post]`, `#[OA\Get]`, …) and are not
controllers." to use the hyphenated compound "route-building process" instead of
"route building process" (i.e., change "During the normal route building
process" to "During the normal route-building process") so the documentation
reads with the preferred hyphenation.

In `@docs/validation.md`:
- Line 3: Update the sentence containing “error handling mechanism” and “RFC
7807 compliant Problem Details responses” to hyphenate the compound modifiers:
change to “error-handling mechanism” and “RFC 7807-compliant Problem Details
responses” so the line reads with consistent, clearer technical phrasing.

In `@README.md`:
- Around line 99-103: The curl example uses a relative path and should be
changed to an absolute URL so users can run it directly; update the example
command (the snippet starting with curl -X POST /api/projects) to include scheme
and host (for example change /api/projects to http://localhost:3000/api/projects
or http://localhost/api/projects) and keep the existing headers and JSON body
unchanged so copy/paste works in common environments.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cfcaf9 and 82b523b.

📒 Files selected for processing (4)
  • README.md
  • docs/command-routing.md
  • docs/openapi.md
  • docs/validation.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
docs/command-routing.md (3)

251-256: Add language identifier to code block.

The fenced code block should specify a language for proper syntax highlighting and markdown linting compliance. Use http as the language identifier.

📝 Proposed fix
 Call
-```
+```http
 POST /api/projects
 Content-Type: application/json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/command-routing.md` around lines 251 - 256, The markdown fenced code
block showing the HTTP request (the block containing "POST /api/projects" and
"Content-Type: application/json") is missing a language identifier; update the
fence to use the `http` language specifier (i.e., change the opening ``` to
```http) so the snippet is properly syntax-highlighted and passes markdown
linting.

294-294: Consider simplifying wording.

"prior to" could be replaced with "before" for simpler, more direct language.

✏️ Suggested simplification
-  - The bundle validates command DTOs prior to dispatch; you'll get a 400 with violation details when constraints fail.
+  - The bundle validates command DTOs before dispatch; you'll get a 400 with violation details when constraints fail.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/command-routing.md` at line 294, Replace the phrase "prior to" with the
simpler word "before" in the sentence that reads "The bundle validates command
DTOs prior to dispatch; you’ll get a 400 with violation details when constraints
fail." so it becomes "The bundle validates command DTOs before dispatch; you’ll
get a 400 with violation details when constraints fail." to improve clarity and
directness.

259-264: Add language identifier to code block.

The fenced code block should specify a language for proper syntax highlighting and markdown linting compliance. Use http as the language identifier.

📝 Proposed fix
 Response
-```
+```http
 HTTP/1.1 201 Created
 Content-Type: application/json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/command-routing.md` around lines 259 - 264, The fenced response example
in the docs/command-routing.md lacks a language tag; update the code fence that
wraps the HTTP response example (the block containing "HTTP/1.1 201 Created" and
the JSON body) to include the `http` language identifier (i.e., change the
opening triple backticks to ```http) so markdown linters and syntax highlighting
can correctly treat it as HTTP.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/command-routing.md`:
- Around line 251-256: The markdown fenced code block showing the HTTP request
(the block containing "POST /api/projects" and "Content-Type: application/json")
is missing a language identifier; update the fence to use the `http` language
specifier (i.e., change the opening ``` to ```http) so the snippet is properly
syntax-highlighted and passes markdown linting.
- Line 294: Replace the phrase "prior to" with the simpler word "before" in the
sentence that reads "The bundle validates command DTOs prior to dispatch; you’ll
get a 400 with violation details when constraints fail." so it becomes "The
bundle validates command DTOs before dispatch; you’ll get a 400 with violation
details when constraints fail." to improve clarity and directness.
- Around line 259-264: The fenced response example in the
docs/command-routing.md lacks a language tag; update the code fence that wraps
the HTTP response example (the block containing "HTTP/1.1 201 Created" and the
JSON body) to include the `http` language identifier (i.e., change the opening
triple backticks to ```http) so markdown linters and syntax highlighting can
correctly treat it as HTTP.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82b523b and 1e11197.

📒 Files selected for processing (3)
  • README.md
  • docs/command-routing.md
  • docs/validation.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • README.md
  • docs/validation.md

@stixx stixx merged commit 391eda8 into main Mar 1, 2026
3 checks passed
@stixx stixx deleted the documentation branch March 1, 2026 21:58
@stixx stixx added the documentation Improvements or additions to documentation label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant