vorteil/direktiv

View on GitHub
openapi/src/paths/secrets.yaml

Summary

Maintainability
Test Coverage

/api/v2/namespaces/{namespace}/secrets:
  get:
    tags:
      - secrets
    summary: Gets all direktiv secrets in a namespace
    parameters:
      - $ref: '../parameters.yaml#/namespace'
    responses:
      "200":
        description: list of direktiv secrets
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: a unique string that represent name of the secret
                      createdAt:
                        type: string
                        description: timestamp of creation date
                      updatedAt:
                        type: string
                        description: timestamp of last updating date

  post:
    tags:
      - secrets
    summary: Creates a new direktiv secret
    parameters:
      - $ref: '../parameters.yaml#/namespace'
    requestBody:
      description: Secret's creating data
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
                description: a unique name string of the secret
              data:
                type: string
                description: base64 encoded string of the secret's data
    responses:
      "200":
        description: data of the created direktiv secret
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    name:
                      type: string
                      description: a unique name string of the secret
                    createdAt:
                      type: string
                      description: timestamp of creation date
                    updatedAt:
                      type: string
                      description: timestamp of last updating date

/api/v2/namespaces/{namespace}/secrets/{secretName}:
  get:
    tags:
      - secrets
    summary: Fetches a direktiv secret
    parameters:
      - $ref: '../parameters.yaml#/namespace'
      - name: secretName
        in: path
        required: true
        schema:
          type: string
          description: name of the secret
    responses:
      "200":
        description: data of the direktiv  secret
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    name:
                      type: string
                      description: a unique name string of the secret
                    createdAt:
                      type: string
                      description: timestamp of creation date
                    updatedAt:
                      type: string
                      description: timestamp of last updating date

  delete:
    tags:
      - secrets
    summary: Removes a direktiv  secret
    parameters:
      - $ref: '../parameters.yaml#/namespace'
      - name: secretName
        in: path
        required: true
        schema:
          type: string
          description: name of the secret
    responses:
      "200":
        description:  object deleted successfully

  patch:
    tags:
      - secrets
    summary: Updates a direktiv secret
    parameters:
      - $ref: '../parameters.yaml#/namespace'
      - name: secretName
        in: path
        required: true
        schema:
          type: string
          description: name of the secret
    requestBody:
      description: Secret's patching data
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
                description: a unique name string of the secret
              data:
                type: string
                description: base64 encoded string of the secret's data
    responses:
      "200":
        description: data of the updated direktiv secret
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    data:
                      type: string
                      description: base64 encoded string of the secret's data