Conversation
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Summary of ChangesHello @hortison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the workspace API definition by moving many schemas and parameters into the components section for better reusability. This is a great improvement for maintainability. I've found one critical YAML syntax error due to incorrect indentation that needs to be fixed, along with a few minor issues in descriptions.
| teams: | ||
| type: array | ||
| x-go-type-skip-optional-pointer: true | ||
| items: |
| description: Pass true to get assigned workspaces, false to get unassigned workspaces | ||
| deleted_at: | ||
| type: boolean | ||
| description: pass true to get deleted workspaces, false to get undeleted workspaces |
| system_id: | ||
| description: | | ||
| The system from which the request is sourced. In the case of Meshery Server, | ||
| the ID is meshery_instance_id of Meshery Server (which can be found in the metadata of`Connections` table). |
| example: deployed | ||
| description: | ||
| description: | | ||
| A summary/receipt of event that occured. |
There was a problem hiding this comment.
Pull request overview
This PR updates the v1beta1 workspace OpenAPI schema, shifting it toward shared core components and richer workspace-related models (teams, environments, designs, views, events) while altering how workspace endpoints are represented.
Changes:
- Replaces the previous top-level
pathsfor/api/workspacesand/api/workspaces/{id}with sharedcomponentselements:responses,parameters(workspace/team/environment/design/view IDs, pagination, filters), and workspace-specific query parameters such asworkspaceFilter. - Expands
components.schemaswith paginated response models (teamPage,environmentPage,eventsPage,mesheryDesignPage,mesheryViewPage) and mapping pages (workspacesDesignsMappingPage,workspacesViewsMappingPage,workspacesEnvironmentsMappingPage,workspacesTeamsMappingPage), pluseventResultandmesheryViewstructures. - Leaves prior detailed workspace paths commented out, effectively making the file define only reusable components and schemas rather than active operations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| items: | ||
| x-go-type: Team | ||
| $ref: ../../v1beta1/team/api.yml#/components/schemas/availableTeam |
There was a problem hiding this comment.
teamPage.teams.items is indented under x-go-type-skip-optional-pointer instead of under teams, which makes this YAML structurally incorrect (the items schema becomes part of the x-go-type-skip-optional-pointer value instead of the array definition). Adjust the indentation so that items is a sibling of x-go-type-skip-optional-pointer inside teams, matching the pattern used in environmentPage.environments.
| items: | |
| x-go-type: Team | |
| $ref: ../../v1beta1/team/api.yml#/components/schemas/availableTeam | |
| items: | |
| x-go-type: Team | |
| $ref: ../../v1beta1/team/api.yml#/components/schemas/availableTeam |
| components: | ||
| securitySchemes: | ||
| jwt: | ||
| type: http | ||
| scheme: Bearer | ||
| bearerFormat: JWT |
There was a problem hiding this comment.
This workspace OpenAPI file no longer defines any active paths for /api/workspaces (only components and commented-out path definitions remain), but the generated TypeScript client (typescript/generated/v1beta1/workspace/WorkspaceSchema.ts) and RTK API clients (typescript/rtk/cloud.ts, typescript/rtk/meshery.ts) still expect /api/workspaces and /api/workspaces/{id} operations. Either restore concrete paths here (using the shared components/parameters and components/responses you just introduced) or update the generated clients and server routing to reflect the new API shape to avoid a divergence between schema and implementation.
| example: deployed | ||
| description: | ||
| description: | | ||
| A summary/receipt of event that occured. |
There was a problem hiding this comment.
In the eventResult.description field, "occured" is misspelled; it should be "occurred" to avoid propagating this typo into generated docs and client SDKs.
| A summary/receipt of event that occured. | |
| A summary/receipt of event that occurred. |
No description provided.