docs: simplify README and create Astro Starlight documentation pages#13
Conversation
- Simplify README.md from ~850 lines to ~60 lines, keeping About, Packages, Installation, and adding a link to the documentation site - Delete quick-start/about.mdx (reorganized into getting-started/) - Update index.mdx with hero actions, About section with code example, Core concepts, Why REPR comparison table, and Next steps CardGrid - Create getting-started/installation.mdx and quick-start.mdx - Create 9 guide pages: defining-endpoints, request-binding, response-types, validation, authorization, error-responses, endpoint-groups, filters, http-context - Create 5 CSV extension pages: index, csv-import, csv-export, row-validation, class-map - Configure sidebar in astro.config.mjs with Getting Started, Guides, and Extensions sections - Add cross-links between related documentation pages Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
📝 WalkthroughWalkthroughRestructures project documentation by migrating content from a bloated README into a comprehensive Astro documentation site with organized guides, getting-started materials, and CSV extension documentation while reducing the README to minimal content linking to Changes
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/src/content/docs/guides/request-binding.mdx`:
- Around line 23-37: The example endpoint uses _repository in
GetUserEndpoint::HandleAsync but never declares or injects it; fix by adding a
repository dependency to the GetUserEndpoint class (e.g., a private readonly
field like _repository of the repository interface used by FindByIdAsync) and
add a constructor that accepts that repository (IUserRepository or your repo
interface) and assigns it to the field so HandleAsync can call
_repository.FindByIdAsync; ensure the constructor parameter name matches the
assigned field and that the repository interface defines
FindByIdAsync(request.Id, CancellationToken).
In `@README.md`:
- Around line 50-54: The visible TODO under the "## Documentation" section in
README.md is being rendered to users; remove that stray text or convert it to an
HTML comment so it doesn't appear in the rendered README (e.g., delete the line
containing "TODO: ドキュメントサイトをデプロイしたら、ここのリンクをデプロイ先URLに更新する" or wrap that exact
text in <!-- ... -->). Locate the TODO near the "## Documentation" header to
apply the change and ensure the documentation link remains intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bfdac37d-578e-4ebe-a903-342381d7e95b
📒 Files selected for processing (20)
README.mddocs/astro.config.mjsdocs/src/content/docs/extensions/csv-helper/class-map.mdxdocs/src/content/docs/extensions/csv-helper/csv-export.mdxdocs/src/content/docs/extensions/csv-helper/csv-import.mdxdocs/src/content/docs/extensions/csv-helper/index.mdxdocs/src/content/docs/extensions/csv-helper/row-validation.mdxdocs/src/content/docs/getting-started/installation.mdxdocs/src/content/docs/getting-started/quick-start.mdxdocs/src/content/docs/guides/authorization.mdxdocs/src/content/docs/guides/defining-endpoints.mdxdocs/src/content/docs/guides/endpoint-groups.mdxdocs/src/content/docs/guides/error-responses.mdxdocs/src/content/docs/guides/filters.mdxdocs/src/content/docs/guides/http-context.mdxdocs/src/content/docs/guides/request-binding.mdxdocs/src/content/docs/guides/response-types.mdxdocs/src/content/docs/guides/validation.mdxdocs/src/content/docs/index.mdxdocs/src/content/docs/quick-start/about.mdx
💤 Files with no reviewable changes (1)
- docs/src/content/docs/quick-start/about.mdx
| public class GetUserEndpoint : IEndpoint<GetUserRequest, Response<GetUserResponse>> | ||
| { | ||
| public void Configure(IEndpointConfiguration config) | ||
| { | ||
| config.Get("/users/{id}") | ||
| .Tags("Users") | ||
| .Summary("Get a user by ID"); | ||
| } | ||
|
|
||
| public async Task<Response<GetUserResponse>> HandleAsync( | ||
| GetUserRequest request, | ||
| CancellationToken cancel) | ||
| { | ||
| var user = await _repository.FindByIdAsync(request.Id, cancel); | ||
|
|
There was a problem hiding this comment.
Add the missing repository dependency in the endpoint example.
_repository is used but never declared/initialized, so this snippet won’t compile when copied.
💡 Proposed fix
public class GetUserEndpoint : IEndpoint<GetUserRequest, Response<GetUserResponse>>
{
+ private readonly IUserRepository _repository;
+
+ public GetUserEndpoint(IUserRepository repository) => _repository = repository;
+
public void Configure(IEndpointConfiguration config)
{
config.Get("/users/{id}")
.Tags("Users")
.Summary("Get a user by ID");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public class GetUserEndpoint : IEndpoint<GetUserRequest, Response<GetUserResponse>> | |
| { | |
| public void Configure(IEndpointConfiguration config) | |
| { | |
| config.Get("/users/{id}") | |
| .Tags("Users") | |
| .Summary("Get a user by ID"); | |
| } | |
| public async Task<Response<GetUserResponse>> HandleAsync( | |
| GetUserRequest request, | |
| CancellationToken cancel) | |
| { | |
| var user = await _repository.FindByIdAsync(request.Id, cancel); | |
| public class GetUserEndpoint : IEndpoint<GetUserRequest, Response<GetUserResponse>> | |
| { | |
| private readonly IUserRepository _repository; | |
| public GetUserEndpoint(IUserRepository repository) => _repository = repository; | |
| public void Configure(IEndpointConfiguration config) | |
| { | |
| config.Get("/users/{id}") | |
| .Tags("Users") | |
| .Summary("Get a user by ID"); | |
| } | |
| public async Task<Response<GetUserResponse>> HandleAsync( | |
| GetUserRequest request, | |
| CancellationToken cancel) | |
| { | |
| var user = await _repository.FindByIdAsync(request.Id, cancel); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/src/content/docs/guides/request-binding.mdx` around lines 23 - 37, The
example endpoint uses _repository in GetUserEndpoint::HandleAsync but never
declares or injects it; fix by adding a repository dependency to the
GetUserEndpoint class (e.g., a private readonly field like _repository of the
repository interface used by FindByIdAsync) and add a constructor that accepts
that repository (IUserRepository or your repo interface) and assigns it to the
field so HandleAsync can call _repository.FindByIdAsync; ensure the constructor
parameter name matches the assigned field and that the repository interface
defines FindByIdAsync(request.Id, CancellationToken).
| ## Documentation | ||
|
|
||
| ```csharp | ||
| CsvResponse.From(rows, classMap: new UserExportRowMap(), fileName: "users.csv") | ||
| ``` | ||
| For detailed usage guides, API reference, and examples, visit the [documentation site](./docs/). | ||
| <!-- TODO: ドキュメントサイトをデプロイしたら、ここのリンクをデプロイ先URLに更新する --> | ||
|
|
There was a problem hiding this comment.
Remove/contain the visible TODO in the rendered README.
The TODO text on Line 53 is not wrapped in an HTML comment, so it will likely render for end users on GitHub/npm views. Either delete it or wrap it like <!-- TODO: ... --> so it doesn’t ship.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 50 - 54, The visible TODO under the "##
Documentation" section in README.md is being rendered to users; remove that
stray text or convert it to an HTML comment so it doesn't appear in the rendered
README (e.g., delete the line containing "TODO:
ドキュメントサイトをデプロイしたら、ここのリンクをデプロイ先URLに更新する" or wrap that exact text in <!-- ...
-->). Locate the TODO near the "## Documentation" header to apply the change and
ensure the documentation link remains intact.
Summary
Simplifies the README.md from ~850 lines to ~60 lines and migrates all detailed content into Astro Starlight documentation pages under
docs/src/content/docs/.README changes
dotnet add packagecommands for nuget.org), Author, and LicenseDocumentation pages created (16 new files)
installation.mdx,quick-start.mdxdefining-endpoints.mdx,request-binding.mdx,response-types.mdx,validation.mdx,authorization.mdx,error-responses.mdx,endpoint-groups.mdx,filters.mdx,http-context.mdxcsv-helper/index.mdx,csv-helper/csv-import.mdx,csv-helper/csv-export.mdx,csv-helper/row-validation.mdx,csv-helper/class-map.mdxOther changes
quick-start/about.mdx(reorganized intogetting-started/)index.mdxwith hero actions, About + code example, Core concepts, Why REPR comparison table, and Next steps CardGridastro.config.mjswith Getting Started, Guides, and Extensions sectionsdotnet add package AxisEndpoints.Extensions.CsvHelper(nuget.org)Review & Testing Checklist for Human
cd docs && npm run buildto confirm all pages build without errors (verified locally — 18 pages built successfully)Notes
:::noteStarlight admonition syntax is used inerror-responses.mdxfor the ProducesSuccess notesitein astro.config) — this is pre-existing and unrelated to this changeLink to Devin session: https://app.devin.ai/sessions/52178bbee89c430d9588a57dfcd35a5e
Requested by: @sheepla
Summary by CodeRabbit
Documentation
Chores