Skip to content

Conversation

@tacklequestions
Copy link
Contributor

@tacklequestions tacklequestions commented Sep 27, 2025

Summary by CodeRabbit

  • New Features
    • API endpoints now support environment-scoped routing and an env parameter for addressing resources by environment.
  • Refactor
    • Public schemas consolidated and renamed to a consistent Open*-prefixed set; many responses and requests updated to use these new schemas.
    • Map-of-strings representation standardized to a simple string map format.
  • Documentation
    • Endpoint descriptions expanded and clarified to reflect environment context and parameter changes.
  • Chores
    • Project generation adds an automated cleanup step to prune files and normalize formatting.

@coderabbitai
Copy link

coderabbitai bot commented Sep 27, 2025

Walkthrough

Renames and consolidates OpenAPI schemas to Open*-prefixed types, updates $ref usages and map representation to additionalProperties:string, and adds env-scoped route/parameter changes in the API. Adds a cleanup block to generate.sh that prunes files, normalizes line endings, trims trailing spaces, and ensures final newlines.

Changes

Cohort / File(s) Summary of changes
OpenAPI schema refactor & path/param updates
apollo-openapi.yaml
Renamed many component schemas to Open* variants and updated all corresponding $ref usages; replaced MapString keyed-map with additionalProperties: string; expanded/HTML-wrapped endpoint descriptions; introduced env-scoped paths and adjusted parameter schemas.
Generation script cleanup
generate.sh
Inserted a cleanup block after adding Maven Wrapper: prints cleaning message, removes common build/VCS artifacts, targets specific file types, normalizes CRLFs, strips trailing spaces, ensures final newline, then returns to parent dir and prints readiness.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I twitch my ears at Open* names anew,
Hops through env-scoped paths with purpose true.
Maps whisper strings in tidy lines,
The script sweeps crumbs and trims the fines.
A rabbit's cheer — merge when you do. 🥕

Pre-merge checks and finishing touches

✅ 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 succinctly identifies the two primary areas of this pull request by noting enhancements to the OpenAPI specification documentation and updates to the cleanup script, which aligns directly with the main changes introduced in the diff.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e136b4a and 48038f2.

📒 Files selected for processing (1)
  • generate.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • generate.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b202f92 and 0545d86.

📒 Files selected for processing (2)
  • apollo-openapi.yaml (72 hunks)
  • generate.sh (1 hunks)

example:
message: 'App not found'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}:
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}:
Copy link
Contributor

Choose a reason for hiding this comment

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

Incompatible changes may affect users' ability to interface with OpenAPI interfaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already fixed that issue, thanks for reviewing!

generate.sh Outdated
find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \
-type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.sh" -o -name ".editorconfig" -o -name ".gitignore" -o -name "mvnw" -o -name "mvnw.cmd" \) -print0 \
| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/\s*\z/\n/s'
echo "Done."
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid ambiguity, for example "Cleaning files (trailing spaces, CRLF, EOF newlines) Done".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already fixed that issue, thanks for reviewing!

dataChangeCreatedTime:
type: string
description: ''
description: 数据创建时间(ISO 8601)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest adding examples to illustrate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already fixed that issue, thanks for reviewing!

example:
message: 'Branch not found'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare:
/openapi/v1/namespaces/items:compare:
Copy link
Contributor

Choose a reason for hiding this comment

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

When handling non-standard CRUD operations, it is recommended to consider the operation itself as a resource. For example, changing "/items:compare" to "/items/compare"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already fixed that issue, thanks for reviewing

…oblems

Co-authored-by: arrow2020 <316166287@qq.com>
@tacklequestions tacklequestions force-pushed the feature/openapi-doc-update branch from e136b4a to 48038f2 Compare September 30, 2025 10:20
@hezhangjian hezhangjian merged commit 2d7db40 into apolloconfig:main Oct 1, 2025
3 of 4 checks passed
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.

3 participants