Skip to content

Commit b4db432

Browse files
committed
* Adds examples
* Removes date constraints Signed-off-by: Viktor Petersson <[email protected]>
1 parent 4170bb3 commit b4db432

File tree

1 file changed

+57
-5
lines changed

1 file changed

+57
-5
lines changed

spec/openapi.json

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@
215215
"required": [
216216
"product_name"
217217
]
218+
},
219+
"examples": {
220+
"basic": {
221+
"summary": "Basic product creation",
222+
"value": {
223+
"product_name": "Example Product"
224+
}
225+
}
218226
}
219227
}
220228
}
@@ -299,6 +307,17 @@
299307
"pre_release"
300308
]
301309
}
310+
},
311+
"examples": {
312+
"basic": {
313+
"summary": "Basic leaf creation",
314+
"value": {
315+
"tea_product_identifier": "123e4567-e89b-12d3-a456-426614174000",
316+
"product_version": "1.0.0",
317+
"release_date": "2024-03-20T15:30:00Z",
318+
"pre_release": false
319+
}
320+
}
302321
}
303322
}
304323
},
@@ -580,6 +599,44 @@
580599
"author",
581600
"reason"
582601
]
602+
},
603+
"examples": {
604+
"basic": {
605+
"summary": "Basic collection creation",
606+
"value": {
607+
"tea_leaf_identifier": "123e4567-e89b-12d3-a456-426614174000",
608+
"product_name": "Example Product",
609+
"product_version": "1.0.0",
610+
"release_date": "2024-03-20T15:30:00Z",
611+
"author": {
612+
"name": "John Doe",
613+
"email": "[email protected]",
614+
"organization": "Example Org"
615+
},
616+
"reason": "New Product Release",
617+
"artifacts": [
618+
{
619+
"name": "Example Artifact",
620+
"type": "bom",
621+
"author": {
622+
"name": "John Doe",
623+
"email": "[email protected]",
624+
"organization": "Example Org"
625+
},
626+
"objects": [
627+
{
628+
"description": "Example SBOM",
629+
"mime_type": "application/json",
630+
"artifact_url": "https://example.com/sbom.json",
631+
"artifact_size_in_bytes": 1024,
632+
"artifact_checksum": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
633+
"artifact_checksum_type": "SHA256"
634+
}
635+
]
636+
}
637+
]
638+
}
639+
}
583640
}
584641
}
585642
}
@@ -671,7 +728,6 @@
671728
"release_date": {
672729
"type": "string",
673730
"format": "date-time",
674-
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})$",
675731
"example": "2024-03-20T15:30:00Z"
676732
},
677733
"author": {
@@ -890,7 +946,6 @@
890946
"release_date": {
891947
"type": "string",
892948
"format": "date-time",
893-
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})$",
894949
"example": "2024-03-20T15:30:00Z"
895950
},
896951
"pre_release": {
@@ -899,7 +954,6 @@
899954
"end_of_life": {
900955
"type": "string",
901956
"format": "date-time",
902-
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})$",
903957
"example": "2024-03-20T15:30:00Z"
904958
},
905959
"collection_references": {
@@ -934,7 +988,6 @@
934988
"release_date": {
935989
"type": "string",
936990
"format": "date-time",
937-
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})$",
938991
"example": "2024-03-20T15:30:00Z"
939992
},
940993
"author": {
@@ -1082,7 +1135,6 @@
10821135
"timestamp": {
10831136
"type": "string",
10841137
"format": "date-time",
1085-
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})$",
10861138
"example": "2024-03-20T15:30:00Z"
10871139
},
10881140
"page_start_index": {

0 commit comments

Comments
 (0)