-
Notifications
You must be signed in to change notification settings - Fork 95
feat(x2a): Initial API changes for devspaces #2594
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| // ****************************************************************** | ||
| // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * | ||
| // ****************************************************************** | ||
| import { DevSpacesWorkspace } from '../models/DevSpacesWorkspace.model'; | ||
| import { MigrationPhase } from '../models/MigrationPhase.model'; | ||
| import { Module } from '../models/Module.model'; | ||
| import { ModulePhase } from '../models/ModulePhase.model'; | ||
|
|
@@ -28,6 +29,8 @@ | |
| import { ProjectsProjectIdCollectArtifactsPost200Response } from '../models/ProjectsProjectIdCollectArtifactsPost200Response.model'; | ||
| import { ProjectsProjectIdCollectArtifactsPostRequest } from '../models/ProjectsProjectIdCollectArtifactsPostRequest.model'; | ||
| import { ProjectsProjectIdDelete200Response } from '../models/ProjectsProjectIdDelete200Response.model'; | ||
| import { ProjectsProjectIdDevspacesDelete200Response } from '../models/ProjectsProjectIdDevspacesDelete200Response.model'; | ||
| import { ProjectsProjectIdDevspacesPost201Response } from '../models/ProjectsProjectIdDevspacesPost201Response.model'; | ||
| import { ProjectsProjectIdModulesModuleIdCancelPostRequest } from '../models/ProjectsProjectIdModulesModuleIdCancelPostRequest.model'; | ||
| import { ProjectsProjectIdModulesModuleIdRunPostRequest } from '../models/ProjectsProjectIdModulesModuleIdRunPostRequest.model'; | ||
| import { ProjectsProjectIdModulesPostRequest } from '../models/ProjectsProjectIdModulesPostRequest.model'; | ||
|
|
@@ -85,6 +88,37 @@ | |
| }; | ||
| response: ProjectsProjectIdDelete200Response; | ||
| }; | ||
| /** | ||
| * @public | ||
| */ | ||
| export type ProjectsProjectIdDevspacesDelete = { | ||
| path: { | ||
| projectId: string; | ||
| }; | ||
| response: ProjectsProjectIdDevspacesDelete200Response | void; | ||
| }; | ||
| /** | ||
| * @public | ||
| */ | ||
| export type ProjectsProjectIdDevspacesGet = { | ||
| path: { | ||
| projectId: string; | ||
| }; | ||
| response: DevSpacesWorkspace | void; | ||
| }; | ||
| /** | ||
| * @public | ||
| */ | ||
| export type ProjectsProjectIdDevspacesPost = { | ||
| path: { | ||
| projectId: string; | ||
| }; | ||
| response: | ||
| | ProjectsProjectIdDevspacesPost201Response | ||
| | DevSpacesWorkspace | ||
| | void | ||
| | void; | ||
|
Check failure on line 120 in workspaces/x2a/plugins/x2a-backend/src/schema/openapi/generated/apis/Api.server.ts
|
||
|
Comment on lines
+119
to
+120
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate? adding an error response body schema to 404/409 would produce cleaner types
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We spoke here offline, the reason of not having a message here, it's because the error are self explanatory, so the frontend can take the error by itself, and apply the translation correctly. |
||
| }; | ||
| /** | ||
| * @public | ||
| */ | ||
|
|
@@ -191,6 +225,12 @@ | |
|
|
||
| '#_delete|/projects/{projectId}': ProjectsProjectIdDelete; | ||
|
|
||
| '#_delete|/projects/{projectId}/devspaces': ProjectsProjectIdDevspacesDelete; | ||
|
|
||
| '#get|/projects/{projectId}/devspaces': ProjectsProjectIdDevspacesGet; | ||
|
|
||
| '#post|/projects/{projectId}/devspaces': ProjectsProjectIdDevspacesPost; | ||
|
|
||
| '#get|/projects/{projectId}': ProjectsProjectIdGet; | ||
|
|
||
| '#get|/projects/{projectId}/log': ProjectsProjectIdLogGet; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| // ****************************************************************** | ||
| // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * | ||
| // ****************************************************************** | ||
| import { DevSpacesWorkspaceStatus } from '../models/DevSpacesWorkspaceStatus.model'; | ||
|
|
||
| /** | ||
| * @public | ||
| */ | ||
| export interface DevSpacesWorkspace { | ||
| /** | ||
| * UUID for the DevSpaces workspace | ||
| */ | ||
| id: string; | ||
| status: DevSpacesWorkspaceStatus; | ||
| /** | ||
| * IDE access URL (only present when status is 'running') | ||
| */ | ||
| url?: string; | ||
| /** | ||
| * Date/time when the workspace was created | ||
| */ | ||
| createdAt: Date; | ||
| /** | ||
| * Error information if status is 'failed' | ||
| */ | ||
| errorDetails?: string; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| // ****************************************************************** | ||
| // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * | ||
| // ****************************************************************** | ||
|
|
||
| /** | ||
| * @public | ||
| */ | ||
| export type DevSpacesWorkspaceStatus = | ||
| | 'starting' | ||
| | 'running' | ||
| | 'stopped' | ||
| | 'failed'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| // ****************************************************************** | ||
| // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * | ||
| // ****************************************************************** | ||
|
|
||
| /** | ||
| * @public | ||
| */ | ||
| export interface ProjectsProjectIdDevspacesDelete200Response { | ||
| /** | ||
| * Confirmation message | ||
| */ | ||
| message: string; | ||
| /** | ||
| * UUID of the deleted workspace | ||
| */ | ||
| deletedWorkspaceId?: string; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| // ****************************************************************** | ||
| // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * | ||
| // ****************************************************************** | ||
| import { DevSpacesWorkspaceStatus } from '../models/DevSpacesWorkspaceStatus.model'; | ||
|
|
||
| /** | ||
| * @public | ||
| */ | ||
| export interface ProjectsProjectIdDevspacesPost201Response { | ||
| /** | ||
| * UUID of the created workspace | ||
| */ | ||
| id: string; | ||
| status: DevSpacesWorkspaceStatus; | ||
| /** | ||
| * Confirmation message | ||
| */ | ||
| message: string; | ||
| } |
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.
1. Devspaces endpoints unimplemented
🐞 Bug✓ CorrectnessThe PR adds /projects/{projectId}/devspaces GET/POST/DELETE to the OpenAPI spec and generates client/server types, but the backend does not register any Express handlers for these routes, so requests will return 404 at runtime.Agent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools