Skip to content

update openapi - #25

Merged
Myxogastria0808 merged 3 commits into
mainfrom
dev
Jan 9, 2026
Merged

update openapi#25
Myxogastria0808 merged 3 commits into
mainfrom
dev

Conversation

@Myxogastria0808

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings January 9, 2026 21:23
@Myxogastria0808
Myxogastria0808 merged commit 70b1a5b into main Jan 9, 2026
12 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the OpenAPI specification to include security documentation for authentication via session cookies, and refactors React components to use Fragments instead of unnecessary div wrappers.

  • Adds SessionCookie security scheme to all protected API endpoints in the OpenAPI specification
  • Removes the deprecated sample endpoint (/api/session) and its related code
  • Refactors React components to replace unnecessary <div> wrappers with React Fragments (<>)
  • Simplifies heading hierarchy in the GroupDetail component

Reviewed changes

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

Show a summary per file
File Description
products/frontend/openapi.json Added global and per-endpoint security configuration for SessionCookie authentication; removed sample endpoint definition
products/frontend/src/routes/Root/index.tsx Replaced div wrapper with React Fragment
products/frontend/src/routes/Invite/index.tsx Replaced div wrappers with React Fragments
products/frontend/src/routes/GroupDetail/index.tsx Replaced div wrappers with React Fragments; simplified heading hierarchy from h1+h2 to single h1
products/frontend/src/routes/GenerateGroup/index.tsx Replaced div wrappers with React Fragments
products/backend/src/presentation/routes/userProfile.ts Added security field to getUserProfile and updateUserProfile endpoints
products/backend/src/presentation/routes/sample.ts Deleted deprecated sample endpoint file
products/backend/src/presentation/routes/info.ts Added security field to info endpoints
products/backend/src/presentation/routes/group.ts Added security field to group endpoints
products/backend/src/presentation/factory/hono.ts Registered SessionCookie security scheme component
products/backend/src/presentation/api.protected.ts Removed sample route registration
products/backend/src/index.ts Updated OpenAPI info metadata to match project details

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

title: 'Pay Crew2 API',
version: '0.0.1',
description: 'API documentation for Pay Crew2 backend',
},

Copilot AI Jan 9, 2026

Copy link

Choose a reason for hiding this comment

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

The OpenAPI specification includes a global security configuration (lines 3-7 in openapi.json), but the backend code that generates the OpenAPI spec doesn't include this global security field in the app.doc configuration. To ensure consistency between the generated spec and the JSON file, consider adding a global security field to the app.doc call in index.ts. This would automatically apply the SessionCookie security requirement to all endpoints unless explicitly overridden.

Suggested change
},
},
security: [
{
SessionCookie: [],
},
],

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.

2 participants