Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 0c4e12a7

Přidáno uživatelem Jan Pašek před téměř 4 roky(ů)

Updated swagger.yaml

Zobrazit rozdíly:

src/swagger.yaml
1
---
1 2
openapi: 3.0.0
2 3
info:
3 4
  title: X.509 certificate management
4 5
  description: API for certificate management created for YOSO company
5
  version: 1.1.0
6
  version: 1.2.0
6 7
servers:
7
- url: https://virtserver.swaggerhub.com/janpasek97/X509_management/1.1.0
8
- url: https://virtserver.swaggerhub.com/janpasek97/X509_management/1.2.0
8 9
  description: X509 management API
9 10
tags:
10 11
- name: certificates
......
26 27
        explode: true
27 28
        schema:
28 29
          $ref: '#/components/schemas/Filtering'
30
      - name: page
31
        in: query
32
        description: Page of the certificates to be displayed
33
        required: false
34
        style: form
35
        explode: true
36
        schema:
37
          type: integer
38
          example: 1
39
      - name: per_page
40
        in: query
41
        description: Number of certificates returned in one page
42
        required: false
43
        style: form
44
        explode: true
45
        schema:
46
          type: integer
47
          example: 10
29 48
      responses:
30 49
        "200":
31 50
          description: returning results matching filtering criteria
......
347 366
            application/json:
348 367
              schema:
349 368
                $ref: '#/components/schemas/ErrorResponse'
369
  /api/certificates/{id}/identity:
370
    post:
371
      tags:
372
      - certificates
373
      summary: Create a PCKS12 identity
374
      description: Create a PCKS12 identity based on the selected certificate. The identity includes the whole chain of trust and uses a specified name and password
375
      operationId: createIdentityById
376
      parameters:
377
      - name: id
378
        in: path
379
        description: ID of a certificate whose private key is to be queried
380
        required: true
381
        style: simple
382
        explode: false
383
        schema:
384
          $ref: '#/components/schemas/IdParameter'
385
      requestBody:
386
        description: Certificate data to be created
387
        content:
388
          application/json:
389
            schema:
390
              $ref: '#/components/schemas/IdentityRequest'
391
      responses:
392
        "201":
393
          description: identity created
394
          content:
395
            application/x-pkcs12:
396
              schema:
397
                type: string
398
                format: binary
399
        "400":
400
          description: invalid input, object invalid
401
          content:
402
            application/json:
403
              schema:
404
                $ref: '#/components/schemas/ErrorResponse'
350 405
components:
351 406
  schemas:
352
    CAUsage:
353
      required:
354
      - CA
355
      - SSL
356
      - authentication
357
      - digitalSignature
407
    CertificateUsage:
358 408
      properties:
359 409
        CA:
360 410
          type: boolean
......
401 451
          format: date
402 452
          example: 2021-07-01
403 453
        usage:
404
          $ref: '#/components/schemas/CAUsage'
454
          $ref: '#/components/schemas/CertificateUsage'
405 455
        issuer:
406 456
          $ref: '#/components/schemas/IssuerListItem'
407 457
    Filtering:
408 458
      properties:
409
        CA:
410
          type: boolean
459
        type:
460
          $ref: '#/components/schemas/CertificateType'
461
        usage:
462
          $ref: '#/components/schemas/CertificateUsage'
411 463
        issuedby:
412 464
          type: integer
413 465
          example: 517
......
447 499
      required:
448 500
      - notAfter
449 501
      - notBefore
502
      - status
450 503
      - subject
451 504
      - usage
452 505
      properties:
......
461 514
          format: date
462 515
          example: 2021-07-01
463 516
        usage:
464
          $ref: '#/components/schemas/CAUsage'
517
          $ref: '#/components/schemas/CertificateUsage'
465 518
        CA:
466 519
          type: integer
467 520
          description: ID of the new item
468 521
          example: 547
522
        status:
523
          type: string
524
          enum:
525
          - valid
526
          - expired
527
          - revoked
469 528
    CertificateRequest:
470 529
      required:
471 530
      - subject
......
490 549
          type: integer
491 550
          description: ID of the new item
492 551
          example: 547
552
        key:
553
          $ref: '#/components/schemas/PrivateKey'
554
        extensions:
555
          type: string
556
          example: subjectAltName=IP:192.168.7.1
493 557
    SuccessResponse:
494 558
      required:
495 559
      - data
......
546 610
        data:
547 611
          type: string
548 612
          description: Single PEM file or concatenation of multiple PEM formatted certificates
549
          example: '-----BEGIN CERTIFICATE-----MIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQ...etc-----END CERTIFICATE-----'
613
          example: '-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----'
550 614
    IdParameter:
551 615
      required:
552 616
      - id
......
574 638
          - cessationOfOperation
575 639
          - certificateHold
576 640
          - removeFromCRL
641
    CertificateType:
642
      properties:
643
        RootCA:
644
          type: boolean
645
        IntermediateCA:
646
          type: boolean
647
        EndCertificate:
648
          type: boolean
649
    PrivateKey:
650
      properties:
651
        password:
652
          type: string
653
          example: passphrase
654
        key_pem:
655
          type: string
656
          example: '-----BEGIN PRIVATE_KEY-----...-----END PRIVATE_KEY-----'
657
    IdentityRequest:
658
      properties:
659
        name:
660
          type: string
661
          example: Jane Doe
662
        password:
663
          type: string
664
          example: passphrase

Také k dispozici: Unified diff