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

doc: add certificates openapi documentation #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
101 changes: 101 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,86 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'

/resources/{instance}/certificate:
parameters:
- in: path
name: instance
example: my-instance
schema:
type: string
required: true
description: Instance name
get:
summary: Get instance certificates
description: This endpoint is exclusive for RPaaS v2 API.
operationId: GetCertificates
tags:
- rpaas
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CertificateData'
post:
summary: Create instance certificate
description: This endpoint is exclusive for RPaaS v2 API.
operationId: CreateCertificate
tags:
- rpaas
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/CertificateData'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CertificateData'
responses:
'200':
description: OK
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/resources/{instance}/certificate/{name}:
parameters:
- in: path
name: instance
example: my-instance
schema:
type: string
required: true
description: Instance name
- in: path
name: name
example: my-instance.example.com
schema:
type: string
required: true
description: Certificate name
delete:
summary: Delete instance certificate
description: This endpoint is exclusive for RPaaS v2 API.
operationId: DeleteCertificate
tags:
- rpaas
responses:
'200':
description: Succesfully removed
default:
description: Something wrong happened
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

components:
securitySchemes:
Expand Down Expand Up @@ -1037,3 +1117,24 @@ components:
lb-name:
type: string
example: my-instance.custom.example.com

CertificateData:
type: object
properties:
name:
type: string
example: my-instance.example.com
certificate:
type: string
example: |-
-----BEGIN CERTIFICATE-----
MIIBhTCCASugAwIBAgIQIRi6zePL6mKjOipnWf86aX6PepsntZv2GYlA5UpabfT2EZICICpJ5h/iI+i341gBmLiAFQOyTDT+/wQc
-----END CERTIFICATE-----
key:
type: string
example: |-
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIrYSSNQFaA2Hwf1duRSxKtLYX5CB04fSeQ6tF1aY/PuoAoGCCqGSM49
AwEHoUQDQgAEPR3tU2Fta9ktY+6P9G0cWO+0kETA6SFs38GecTyudlHz6xvCdz8q
EKTcWGekdmdDPsHloRNtsiCa697B2O9IFA==
-----END EC PRIVATE KEY-----