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

Create OCP Project: change openapi spec to stick to OCP behaviour #490

Merged
merged 1 commit into from
Nov 6, 2024
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
8 changes: 4 additions & 4 deletions create-ocp-project/create-ocp-project.sw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ functions:
operation: specs/jira-openapi.yaml#getIssueTransitions
- name: createNotification
operation: notifications#createNotification
- name: createProjectOpenshiftIoV1Project
operation: specs/ocp-project-openapi.yaml#createProjectOpenshiftIoV1Project
- name: createProjectRequestOpenshiftIoV1Project
operation: specs/ocp-project-openapi.yaml#createProjectRequestOpenshiftIoV1Project
- name: readProjectOpenshiftIoV1Project
operation: specs/ocp-project-openapi.yaml#readProjectOpenshiftIoV1Project
- name: print
Expand Down Expand Up @@ -148,9 +148,9 @@ states:
actions:
- name: "Create OCP Project"
functionRef:
refName: createProjectOpenshiftIoV1Project
refName: createProjectRequestOpenshiftIoV1Project
arguments:
kind: Project
kind: ProjectRequest
metadata:
labels:
kubernetes.io/metadata.name: .projectName
Expand Down
24 changes: 12 additions & 12 deletions create-ocp-project/specs/ocp-project-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ servers:
security:
- BearerToken: []
paths:
/apis/project.openshift.io/v1/projects:
/apis/project.openshift.io/v1/projectrequests:
post:
tags:
- projectOpenshiftIo_v1
description: create a Project
operationId: createProjectOpenshiftIoV1Project
operationId: createProjectRequestOpenshiftIoV1Project
parameters:
- name: pretty
in: query
Expand Down Expand Up @@ -55,45 +55,45 @@ paths:
content:
'*/*':
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/yaml:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/vnd.kubernetes.protobuf:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/yaml:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/vnd.kubernetes.protobuf:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
"202":
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/yaml:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
application/vnd.kubernetes.protobuf:
schema:
$ref: '#/components/schemas/com.github.openshift.api.project.v1.Project'
$ref: '#/components/schemas/com.github.openshift.api.project.v1.ProjectRequest'
"401":
description: Unauthorized
content: {}
Expand Down