Skip to content

Add Team#601

Open
hortison wants to merge 2 commits intomasterfrom
workspace-subresources
Open

Add Team#601
hortison wants to merge 2 commits intomasterfrom
workspace-subresources

Conversation

@hortison
Copy link
Copy Markdown
Contributor

@hortison hortison commented Jan 24, 2026

No description provided.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Copilot AI review requested due to automatic review settings January 24, 2026 03:31
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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 workspace API definition by removing direct API path declarations and introducing a more modular and reusable component-based structure. It centralizes common API responses and parameters, and substantially expands the data models by adding new paginated schemas for various entities like teams, environments, designs, views, and event results, enhancing the API's consistency and data representation capabilities.

Highlights

  • API Path Refactoring: The direct API path definitions for workspace operations (GET, POST, PUT, DELETE) have been removed from this file, indicating a refactoring or relocation of these endpoint definitions.
  • Standardized API Components: Reusable API response components (e.g., 200, 400, 401, 404, 500) and standardized API parameter definitions (e.g., workspaceId, teamId, search, filter) have been introduced by referencing common schemas from v1alpha1/core/api.yml.
  • Expanded Schema Definitions: New schema definitions have been added for paginated lists of various entities, including teamPage, environmentPage, eventsPage, mesheryDesignPage, mesheryViewPage, and several workspaces*MappingPage schemas, along with a detailed eventResult schema.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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

critical

There's an indentation error here. The items property should be at the same indentation level as type and x-go-type-skip-optional-pointer. This will cause a YAML parsing error.

          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
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.

medium

The description here is a bit informal and doesn't start with a capital letter. It's better to use more formal language for API documentation.

            description: If true, returns deleted workspaces. If false, returns non-deleted 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).
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.

medium

There's a misplaced backtick in the description. It seems to be intended for markdown code formatting and should surround the word Connections.

            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.
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.

medium

There is a typo in the description. occured should be occurred.

            A summary/receipt of event that occurred.

Copy link
Copy Markdown
Contributor

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 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 paths for /api/workspaces and /api/workspaces/{id} with shared components elements: responses, parameters (workspace/team/environment/design/view IDs, pagination, filters), and workspace-specific query parameters such as workspaceFilter.
  • Expands components.schemas with paginated response models (teamPage, environmentPage, eventsPage, mesheryDesignPage, mesheryViewPage) and mapping pages (workspacesDesignsMappingPage, workspacesViewsMappingPage, workspacesEnvironmentsMappingPage, workspacesTeamsMappingPage), plus eventResult and mesheryView structures.
  • 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.

Comment on lines +190 to +192
items:
x-go-type: Team
$ref: ../../v1beta1/team/api.yml#/components/schemas/availableTeam
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 25
components:
securitySchemes:
jwt:
type: http
scheme: Bearer
bearerFormat: JWT
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
example: deployed
description:
description: |
A summary/receipt of event that occured.
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

In the eventResult.description field, "occured" is misspelled; it should be "occurred" to avoid propagating this typo into generated docs and client SDKs.

Suggested change
A summary/receipt of event that occured.
A summary/receipt of event that occurred.

Copilot uses AI. Check for mistakes.
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
@fitzergerald fitzergerald changed the title update workspace Add Team Mar 15, 2026
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