-
Notifications
You must be signed in to change notification settings - Fork 9
update(api): 更新openapi文档,将service变量重命名为function_name #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 updates the OpenAPI documentation and renames the service
variable to function_name
throughout the codebase for consistency and clarity.
- Renames
service
field tofunction_name
in various structs and handlers - Updates OpenAPI documentation to reflect the new field names and adds new authentication endpoints
- Modifies API path patterns to use more descriptive parameter names
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
docs/openapi.yaml | Updates API documentation with new function endpoints, authentication routes, and renamed parameters |
crates/gateway/src/types/function.rs | Renames service field to function_name in Deployment, Status, and Query structs |
crates/gateway/src/handlers/proxy.rs | Updates variable naming to use function_name instead of service |
crates/gateway/src/handlers/function.rs | Updates function handlers to use function_name field and parameter names |
crates/gateway/src/bootstrap/mod.rs | Updates test code to use new field name |
crates/faas-containerd/src/provider/function/update.rs | Updates update logic to use function_name field |
crates/faas-containerd/src/provider/function/status.rs | Updates status response to use function_name field |
crates/faas-containerd/src/provider/function/list.rs | Updates list functionality to use function_name field |
crates/faas-containerd/src/impls/task.rs | Updates task management to use function_name field |
crates/faas-containerd/src/impls/spec.rs | Updates container spec generation to use function_name field |
crates/faas-containerd/src/impls/snapshot.rs | Updates snapshot operations to use function_name field |
crates/faas-containerd/src/impls/function.rs | Updates function conversion to use function_name field |
crates/faas-containerd/src/impls/container.rs | Updates container operations to use function_name field |
crates/faas-containerd/src/impls/cni/mod.rs | Updates Endpoint struct and related operations to use function_name field |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
schema: | ||
type: object | ||
required: [message, user_id] | ||
properties: | ||
message: | ||
type: string | ||
example: User created successfully | ||
user_id: | ||
type: string | ||
example: "10086" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's inconsistent indentation on line 202. The content:
line should be indented to match the parent 200:
block structure.
schema: | |
type: object | |
required: [message, user_id] | |
properties: | |
message: | |
type: string | |
example: User created successfully | |
user_id: | |
type: string | |
example: "10086" | |
schema: | |
type: object | |
required: [message, user_id] | |
properties: | |
message: | |
type: string | |
example: User created successfully | |
user_id: | |
type: string | |
example: "10086" |
Copilot uses AI. Check for mistakes.
example: echo.test | ||
- name: function_name | ||
in: path | ||
description: function_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The parameter description should be more descriptive. Consider changing from 'function_name' to 'Function name' to match the style of other parameter descriptions.
description: function_name | |
description: Function name |
Copilot uses AI. Check for mistakes.
No description provided.