Skip to content
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

Add /devfile PUT and GET endpoints #6950

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pkg/apiserver-gen/**/* linguist-generated=true
pkg/**/mock.go linguist-generated=true
pkg/**/mock_Backend.go linguist-generated=true
pkg/**/mock_Client.go linguist-generated=true
ui/src/app/api-gen/**/* linguist-generated=true
119 changes: 112 additions & 7 deletions ododevapispec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,67 @@ paths:
example:
message: "a push operation is not possible at this time. Please retry later"

/devfile:
put:
description: Updates the Devfile used by the current dev session
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DevfilePutRequest"
responses:
'200':
description: Devfile content was successfully updated
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralSuccess'
example:
message: "The Devfile content has been updated successfully"

'500':
description: Error updating the Devfile content
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'
example:
message: "Error updating the Devfile content"

get:
description: Get the raw content of the Devfile used by the current dev session
responses:
'200':
description: Devfile content was successfully returned
content:
application/json:
schema:
type: object
properties:
content:
type: string
example:
{
"content": "schemaVersion: 2.2.0\n",
}
'500':
description: Error getting the Devfile content
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'
example:
message: "Error getting the Devfile content"


/devstate/devfile:
put:
description: Updates the complete Devfile content
requestBody:
content:
application/json:
schema:
type: object
required:
- content
properties:
content:
type: string
$ref: "#/components/schemas/DevstateDevfilePutRequest"
responses:
'200':
description: Devfile content was successfully updated
Expand Down Expand Up @@ -382,7 +430,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Metadata'
$ref: '#/components/schemas/MetadataRequest'
responses:
'200':
description: metadata was successfully updated
Expand Down Expand Up @@ -1176,6 +1224,20 @@ components:
properties:
message:
type: string
DevfilePutRequest:
type: object
required:
- content
properties:
content:
type: string
DevstateDevfilePutRequest:
type: object
required:
- content
properties:
content:
type: string
DevfileContent:
type: object
required:
Expand Down Expand Up @@ -1361,6 +1423,49 @@ components:
items:
type: string
Metadata:
type: object
required:
- name
- version
- displayName
- description
- tags
- architectures
- icon
- globalMemoryLimit
- projectType
- language
- website
- provider
- supportUrl
properties:
name:
type: string
version:
type: string
displayName:
type: string
description:
type: string
tags:
type: string
architectures:
type: string
icon:
type: string
globalMemoryLimit:
type: string
projectType:
type: string
language:
type: string
website:
type: string
provider:
type: string
supportUrl:
type: string
MetadataRequest:
type: object
properties:
name:
Expand Down
5 changes: 4 additions & 1 deletion pkg/apiserver-gen/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pkg/apiserver-gen/go/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 53 additions & 4 deletions pkg/apiserver-gen/go/api_default.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions pkg/apiserver-gen/go/model__devfile_get_200_response.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading