openapi: "3.0.0"
info:
  title: Crypto
  description: API specification for crypto services available within nuts node
  version: 1.0.0
  license:
    name: GPLv3
servers:
  - url: http://localhost:1323
paths:
  /internal/crypto/v1/sign_jwt:
    post:
      summary: "sign a JWT payload with the private key of the given kid"
      description: |
        Sign a JWT payload with the private key of the given kid

        error returns:
        * 400 - incorrect input
      operationId: signJwt
      tags:
        - crypto
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignJwtRequest'
      responses:
        '200':
          description: "OK response, body holds JWT"
          content:
            text/plain:
              schema:
                example: "aa==.bb==.cc=="
        default:
          $ref: '../common/error_response.yaml'

components:
  schemas:
    SignJwtRequest:
      required:
        - claims
        - kid
      properties:
        kid:
          type: string
        claims:
          type: object
