7
7
description : TBC
8
8
contact :
9
9
name : TEA Working Group
10
- email : TBC
10
+
11
11
url : https://github.com/CycloneDX/transparency-exchange-api
12
12
license :
13
13
name : Apache 2.0
@@ -17,81 +17,82 @@ servers:
17
17
- url : http://localhost/tea/v1
18
18
description : Local development
19
19
paths :
20
- " /product/uuid/{uuid} " :
20
+ /product/uuid/{uuid} :
21
21
get :
22
22
description : Returns the corresponding leafs for a given product UUID.
23
23
operationId : getTeaProductByUuid
24
24
parameters :
25
- - " $ref " : " #/components/parameters/tei_urn"
25
+ # @todo
26
+ - $ref : " #/components/parameters/tei_urn"
26
27
responses :
27
- ' 200 ' :
28
+ 200 :
28
29
description : Requested TEA Product found and returned
29
30
content :
30
31
application/json :
31
32
schema :
32
- " $ref " : " #/components/schemas/product"
33
- ' 404 ' :
34
- " $ref " : " #/components/responses/404-object-by-id-not-found"
33
+ $ref : " #/components/schemas/product"
34
+ 400 :
35
+ $ref : " #/components/responses/400-invalid-request"
36
+ 404 :
37
+ $ref : " #/components/responses/404-object-by-id-not-found"
35
38
tags :
36
39
- TEA Product
37
- " /product/type/{type_identifier} " :
40
+ /product/{product-identifier- type}/{product-identifier} :
38
41
get :
39
42
description : Returns a list of TEA products. Note that multiple products may
40
43
match.
41
- operationId : ProductByIdentifier
44
+ operationId : getTeaProductByIdentifier
42
45
parameters :
43
- - name : type_identifier
44
- description : The identifier type (enum)
45
- in : path
46
- required : true
47
- schema :
48
- " $ref " : " #/components/schemas/identifier"
49
- - name : type_val
50
- description : The actual identifier string
51
- in : query
52
- required : true
53
- schema :
54
- type : string
46
+ - $ref : " #/components/schemas/identifier_type"
47
+ - $ref : " #/components/parameters/product-identifier"
48
+ - $ref : " #/components/parameters/page-offset"
49
+ - $ref : " #/components/parameters/page-size"
55
50
responses :
56
- ' 200 ' :
51
+ 200 :
57
52
description : Product retrieved successfully
58
- content :
59
- application/json :
60
- schema :
61
- " $ref " : " #/components/responses/paginated_product_list"
62
- " $ref " : " #/components/responses/standard_errors"
63
- " /leaf/{tea_leaf_identifier} " :
53
+ $ref : " #/components/responses/paginated-product"
54
+ 400 :
55
+ $ref : " #/components/responses/400-invalid-request"
56
+ 404 :
57
+ $ref : " #/components/responses/404-object-by-id-not-found"
58
+ tags :
59
+ - TEA Product
60
+ /leaf/{leaf-identifier} :
64
61
get :
65
62
description : Get the TEA Leaf that describes the Version of a Product
66
- operationId : getTeaLeaf
63
+ operationId : getTeaLeafById
67
64
parameters :
68
- - " $ref " : " #/components/parameters/tea_leaf_identifier "
65
+ - $ref : " #/components/schemas/uuid "
69
66
responses :
70
- ' 200 ' :
67
+ 200 :
71
68
description : Requested TEA Leaf found and returned
72
69
content :
73
70
application/json :
74
71
schema :
75
72
" $ref " : " #/components/schemas/component"
76
- ' 404 ' :
77
- " $ref " : " #/components/responses/404-object-by-id-not-found"
73
+ 400 :
74
+ $ref : " #/components/responses/400-invalid-request"
75
+ 404 :
76
+ $ref : " #/components/responses/404-object-by-id-not-found"
78
77
tags :
79
78
- TEA Leaf
80
- " /collection/{tea_collection_identifier} " :
79
+ /collection/{collection-identifier} :
81
80
get :
82
81
description : Get a TEA Collection by it's Identifier
83
- operationId : getTeaCollection
82
+ operationId : getTeaCollectionById
84
83
parameters :
85
- - " $ref " : " #/components/parameters/tea_collection_identifier "
84
+ - $ref : " #/components/schemas/uuid "
86
85
responses :
87
- ' 200 ' :
86
+ 200 :
88
87
description : Requested TEA Collection found and returned
89
88
content :
90
89
application/json :
91
90
schema :
92
91
" $ref " : " #/components/schemas/collection"
93
- ' 404 ' :
94
- " $ref " : " #/components/responses/404-object-by-id-not-found"
92
+ 400 :
93
+ $ref : " #/components/responses/400-invalid-request"
94
+ 404 :
95
+ $ref : " #/components/responses/404-object-by-id-not-found"
95
96
tags :
96
97
- TEA Collection
97
98
webhooks : {}
@@ -469,72 +470,37 @@ components:
469
470
- BLAKE2b-512
470
471
- BLAKE3
471
472
responses :
472
- base_error :
473
- type : object
474
- description : Error message
475
- properties :
476
- error :
477
- type : string
478
- message :
479
- type : string
480
- 404-object-by-id-not-found :
481
- description : Object requested by identifier not found
473
+ 204-common-delete :
474
+ description : Object deleted successfully
475
+ content :
476
+ application/json : {}
477
+ 400-invalid-request :
478
+ description : Request was Invalid
482
479
content :
483
480
application/json : {}
484
481
401-unauthorized :
485
482
description : Authentication required
486
483
content :
487
484
application/json : {}
488
- pagination_details :
489
- type : object
490
- description : Pagination details
491
- properties :
492
- timestamp :
493
- type : string
494
- format : date-time
495
- example : ' 2024-03-20T15:30:00Z'
496
- page_start_index :
497
- type : number
498
- format : int64
499
- default : 0
500
- page_size :
501
- type : number
502
- format : int64
503
- default : 100
504
- total_results :
505
- type : number
506
- format : int64
507
- required :
508
- - timestamp
509
- - page_start_index
510
- - page_size
511
- - total_results
512
- paginated_product_list :
513
- type : object
514
- description : List of Products
515
- allOf :
516
- - $ref : " #/components/responses/pagination_details"
517
- - type : object
518
- properties :
519
- products :
520
- type : array
521
- items :
522
- $ref : " #/components/schemas/product"
523
- standard_errors :
524
- description : Standard error codes
525
- ' 400 ' :
526
- description : Invalid request body
527
- content :
528
- application/json : {}
529
- ' 401 ' :
530
- " $ref " : " #/components/responses/401-unauthorized"
531
- ' 404 ' :
532
- " $ref " : " #/components/responses/404-object-by-id-not-found"
533
- standard_delete :
534
- description : Delete response
535
- ' 204 ' :
536
- description : Resource successfully deleted
485
+ 404-object-by-id-not-found :
486
+ description : Object requested by identifier not found
487
+ content :
488
+ application/json : {}
489
+ paginated-product :
490
+ description : A paginated response containing TEA Products
491
+ content :
492
+ application/json :
493
+ schema :
494
+ allOf :
495
+ - $ref : " #/components/schemas/product"
496
+ - type : object
497
+ properties :
498
+ results :
499
+ type : array
500
+ items :
501
+ " $ref " : " #/components/schemas/product"
537
502
parameters :
503
+ # Pagination
538
504
page-offset :
539
505
name : page-offset
540
506
description : Pagination offset
@@ -553,86 +519,50 @@ components:
553
519
type : number
554
520
format : int64
555
521
default : 100
556
- tei_urn :
557
- name : tei_urn
558
- description : Transparency Exchange Identifier (URN)
522
+ # Identifiers
523
+ collection-identifier :
524
+ name : collection-identifier
525
+ description : TEA Collection Identifier
559
526
in : path
560
527
required : true
561
528
schema :
562
- type : string
563
- tea_product_identifier :
564
- name : tea_product_identifier
565
- description : TEA Product Identifier
529
+ $ref : " #/components/schemas/uuid "
530
+ leaf-identifier :
531
+ name : leaf-identifier
532
+ description : TEA Leaf Identifier
566
533
in : path
567
534
required : true
568
535
schema :
569
- type : string
570
- product_version :
571
- name : product_version
572
- description : Product Version string
536
+ $ref : " #/components/schemas/uuid "
537
+ product-identifier-type :
538
+ name : product-identifier-type
539
+ description : The identifier type (enum)
573
540
in : path
574
541
required : true
575
542
schema :
576
- type : string
577
- tea_collection_identifier :
578
- name : tea_collection_identifier
579
- description : TEA Collection Identifier
580
- in : path
543
+ $ref : " #/components/schemas/identifier_type "
544
+ product-identifier :
545
+ name : product-identifier
546
+ description : The actual identifier string
547
+ in : query
581
548
required : true
582
549
schema :
583
550
type : string
584
- tea_leaf_identifier :
585
- name : tea_leaf_identifier
586
- description : TEA Leaf Identifier
551
+ # @todo - REVIEW AS THIS IS USED AS A UUID in /product/uuid/{uuid} ??
552
+ tei_urn :
553
+ name : tei_urn
554
+ description : Transparency Exchange Identifier (URN)
587
555
in : path
588
556
required : true
589
557
schema :
590
558
type : string
591
- purl :
592
- name : purl
593
- description : Package URL (PURL)
594
- in : query
595
- required : false
596
- schema :
597
- type : string
598
- barcode :
599
- name : barcode
600
- description : Barcode
601
- in : query
602
- required : false
603
- schema :
604
- type : string
605
- sku :
606
- name : sku
607
- description : Product SKU
608
- in : query
609
- required : false
610
- schema :
611
- type : string
612
- vendor_uuid :
613
- name : vendor_uuid
614
- description : Vendor UUID
615
- in : query
616
- required : false
617
- schema :
618
- " $ref " : " #/components/schemas/uuid"
619
559
securitySchemes :
620
560
bearerAuth :
621
561
type : http
622
562
scheme : bearer
623
563
basicAuth :
624
564
type : http
625
565
scheme : basic
626
- security_requirements :
627
- standard_auth :
628
- - bearerAuth : []
629
- - basicAuth : []
630
- operations :
631
- standard_delete :
632
- responses :
633
- " $ref " : " #/components/responses/standard_delete"
634
- security :
635
- " $ref " : " #/components/security_requirements/standard_auth"
636
566
security :
637
567
- bearerAuth : []
638
568
- basicAuth : []
0 commit comments