Skip to content

Add API endpoint guide to Home page#15

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-api-endpoint-guide-to-home
Draft

Add API endpoint guide to Home page#15
Copilot wants to merge 3 commits intomainfrom
copilot/add-api-endpoint-guide-to-home

Conversation

Copy link

Copilot AI commented Feb 3, 2026

Adds developer-facing API documentation directly on the home page to improve API discoverability.

Changes

  • API Documentation Card: Documents /api/ShipAgenciesApi endpoint with method, path, and JSON response example
  • Swagger UI Integration: Direct link to interactive API testing interface
  • Quick Start Guide: Base URL, response format, and example cURL command
  • Dynamic URL Generation: Uses request context for environment-agnostic URLs
<code>@Context.Request.Scheme://@Context.Request.Host/api/</code>

Instead of hardcoded http://localhost:5145/api/

Screenshot

API Endpoint Guide

The guide section appears below the module cards on the home page, styled with Bootstrap 5 cards for visual consistency.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add API endpoint guide to Home</issue_title>
<issue_description>implement to Add API endpoint guide to Home</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link

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.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 2 commits February 3, 2026 06:34
Co-authored-by: ramesh2051 <95218310+ramesh2051@users.noreply.github.com>
Co-authored-by: ramesh2051 <95218310+ramesh2051@users.noreply.github.com>
Copilot AI changed the title [WIP] Add API endpoint guide to home page Add API endpoint guide to Home page Feb 3, 2026
@ramesh2051 ramesh2051 requested a review from Copilot February 3, 2026 06:47
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +119 to +133
<div class="col-lg-6">
<div class="card border-0 shadow-sm h-100 bg-light">
<div class="card-body d-flex flex-column justify-content-center text-center p-5">
<i class="bi bi-play-circle-fill display-1 text-primary mb-4"></i>
<h4 class="mb-3">Interactive API Testing</h4>
<p class="text-muted mb-4">
Try out all available APIs directly in your browser with our Swagger UI interface.
Test endpoints, view request/response formats, and explore the complete API documentation.
</p>
<a href="/swagger" class="btn btn-primary btn-lg">
<i class="bi bi-box-arrow-up-right"></i> Open Swagger UI
</a>
</div>
</div>
</div>
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The Swagger UI link will not function in production environments since Swagger is only enabled when the application runs in Development mode (as configured in Program.cs lines 12-16). When users click this button in production, they will encounter a 404 error. Consider either:

  1. Adding conditional rendering to show this card only in Development environments using @if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development")
  2. Adding a note in the card explaining that Swagger is only available in development environments
  3. Configuring Swagger to be available in all environments (though this may have security implications)

Copilot uses AI. Check for mistakes.
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.

Add API endpoint guide to Home

2 participants