Skip to content

Commit

Permalink
Merge pull request #83 from vpetersson/product_patch
Browse files Browse the repository at this point in the history
Adds the ability to patch `/product/tea_product_identifier`
  • Loading branch information
madpah authored Nov 20, 2024
2 parents 86e563b + 14b3175 commit 6b90fd4
Showing 1 changed file with 67 additions and 4 deletions.
71 changes: 67 additions & 4 deletions spec/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,36 @@
"properties": {
"product_name": {
"type": "string"
},
"barcode": {
"type": "string",
"description": "Barcode"
},
"sku": {
"type": "string",
"description": "Product SKU"
},
"vendor_uuid": {
"$ref": "#/components/schemas/type_uuid",
"description": "Vendor UUID"
},
"purl": {
"type": "string",
"description": "Package URL (PURL)"
}
},
"required": [
"product_name"
]
}
},
"examples": {
"basic": {
"summary": "Basic product update",
"value": {
"product_name": "Updated Product Name",
"barcode": "123456789012",
"sku": "PROD-001",
"vendor_uuid": "123e4567-e89b-12d3-a456-426614174000",
"purl": "pkg:generic/example@1.0.0"
}
}
}
}
}
Expand Down Expand Up @@ -210,6 +235,22 @@
"properties": {
"product_name": {
"type": "string"
},
"barcode": {
"type": "string",
"description": "Barcode"
},
"sku": {
"type": "string",
"description": "Product SKU"
},
"vendor_uuid": {
"$ref": "#/components/schemas/type_uuid",
"description": "Vendor UUID"
},
"purl": {
"type": "string",
"description": "Package URL (PURL)"
}
},
"required": [
Expand All @@ -222,6 +263,16 @@
"value": {
"product_name": "Example Product"
}
},
"full": {
"summary": "Full product creation with all fields",
"value": {
"product_name": "Complete Product Example",
"barcode": "123456789012",
"sku": "PROD-001",
"vendor_uuid": "123e4567-e89b-12d3-a456-426614174000",
"purl": "pkg:generic/example@1.0.0"
}
}
}
}
Expand All @@ -240,6 +291,18 @@
},
"product_name": {
"type": "string"
},
"barcode": {
"type": "string"
},
"sku": {
"type": "string"
},
"vendor_uuid": {
"$ref": "#/components/schemas/type_uuid"
},
"purl": {
"type": "string"
}
},
"required": [
Expand Down

0 comments on commit 6b90fd4

Please sign in to comment.