Skip to content
Snippets Groups Projects
Commit f75c6a55 authored by dianapicnic's avatar dianapicnic
Browse files

BA-115: Using asset type agnostic struct to represent type specific data

parent e540932b
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,14 @@
},
"additionalProperties": {}
},
"protobufNullValue": {
"type": "string",
"enum": [
"NULL_VALUE"
],
"default": "NULL_VALUE",
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
},
"protobufPageInput": {
"type": "object",
"properties": {
......@@ -111,9 +119,6 @@
"previewUrl": {
"type": "string"
},
"resourceUrl": {
"type": "string"
},
"ownerId": {
"type": "string"
},
......@@ -122,6 +127,9 @@
},
"error": {
"type": "string"
},
"payload": {
"type": "object"
}
}
},
......
This diff is collapsed.
......@@ -4,6 +4,7 @@ syntax = "proto3";
package basket.asset_service.v1;
import "basket/protobuf/page.proto";
import "google/protobuf/struct.proto";
option go_package = "gitlab.com/picnic-app/backend/libs/golang/protobuf-registry/gen/basket/asset-service/v1";
......@@ -42,10 +43,10 @@ message Asset {
string description = 3;
AssetType type = 4;
optional string preview_url = 5;
string resource_url = 6;
optional string owner_id = 7;
AssetStatus status = 8;
optional string error = 9;
optional string owner_id = 6;
AssetStatus status = 7;
optional string error = 8;
google.protobuf.Struct payload = 9;
}
message GetAssetsRequest {
......@@ -67,11 +68,11 @@ message UploadFileResponse {
}
message CreateAssetRequest {
// Use UploadAsset to get upload_id.
string upload_id = 1;
AssetType type = 1;
string name = 2;
optional string description = 3;
bool skip_normalization = 4;
google.protobuf.Struct payload = 4;
bool skip_normalization = 5;
}
message CreateAssetResponse {
......@@ -82,7 +83,8 @@ message UpdateAssetRequest {
string id = 1;
optional string name = 2;
optional string description = 3;
optional string preview_id = 4;
google.protobuf.Struct payload = 4;
bool skip_normalization = 5;
}
message UpdateAssetResponse {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment