Skip to content

Conversation

jordane
Copy link
Contributor

@jordane jordane commented Aug 20, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 18:22
@jordane jordane requested a review from a team as a code owner August 20, 2025 18:22
Copy link

coderabbitai bot commented Aug 20, 2025

Walkthrough

Added Meta("swagger:generate", "false") to the readyz and livez methods in api/project/v1/design/project.go to prevent Swagger/OpenAPI generation for these health-check endpoints in the project-service design.

Changes

Cohort / File(s) Summary of changes
API design: disable Swagger for health endpoints
api/project/v1/design/project.go
Updated readyz and livez method DSL to include Meta("swagger:generate", "false"), disabling OpenAPI generation for these endpoints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jme/LFXV2-307

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@Copilot 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 excludes the /livez and /readyz health check endpoints from the generated OpenAPI specifications. These health monitoring endpoints are typically not part of the public API documentation and don't need to be exposed in the OpenAPI specs.

  • Adds metadata to exclude health check endpoints from OpenAPI generation
  • Removes existing /livez and /readyz endpoint documentation from all OpenAPI spec files

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
api/project/v1/design/project.go Adds Meta("swagger:generate", "false") to readyz and livez method definitions
api/project/v1/gen/http/openapi3.yaml Removes /livez and /readyz endpoint definitions from OpenAPI 3.0 spec
api/project/v1/gen/http/openapi.yaml Removes /livez and /readyz endpoint definitions from Swagger 2.0 spec
api/project/v1/gen/http/openapi.json Removes /livez and /readyz endpoint definitions from JSON spec

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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: 0

🧹 Nitpick comments (1)
api/project/v1/design/project.go (1)

336-339: Apply the same verification for livez (and optionally document intent)

Same concern as readyz: ensure the Meta key is recognized so /livez is omitted from the spec. A small comment above the Meta call can clarify intent for maintainers.

Optionally add a comment:

 Method("livez", func() {
   Description("Check if the service is alive.")
+  // Hide health-check endpoint from generated OpenAPI/Swagger
   Meta("swagger:generate", "false")
   Result(Bytes, func() {
     Example("OK")
   })
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7836ac0 and 1a9d240.

⛔ Files ignored due to path filters (4)
  • api/project/v1/gen/http/openapi.json is excluded by !**/gen/**
  • api/project/v1/gen/http/openapi.yaml is excluded by !**/gen/**
  • api/project/v1/gen/http/openapi3.json is excluded by !**/gen/**
  • api/project/v1/gen/http/openapi3.yaml is excluded by !**/gen/**
📒 Files selected for processing (1)
  • api/project/v1/design/project.go (2 hunks)
🔇 Additional comments (1)
api/project/v1/design/project.go (1)

320-323: Confirm Goa v3.21.1 OpenAPI plugin honors Meta("swagger:generate", "false")

We’re using
• goa.design/goa/v3 v3.21.1 (from go.mod)
• Meta("swagger:generate", "false") on both /readyz (lines 320–323) and /livez (lines 336–338) in api/project/v1/design/project.go

No generated OpenAPI artifacts are committed, so please:

  • Generate the OpenAPI spec locally (e.g. goa gen openapi …)
  • Verify that neither /readyz nor /livez appear in the output
  • If they do appear, switch to a supported exclude key (e.g. swagger:exclude or openapi:exclude) per your plugin version

Also, add a brief code comment above each health endpoint explaining why it’s excluded to prevent accidental removals in future edits.

@jordane jordane merged commit 32fb33f into main Aug 20, 2025
5 checks passed
@jordane jordane deleted the jme/LFXV2-307 branch August 20, 2025 18:28
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