From 223a553733b17432bfdffe842f853369bd5d517c Mon Sep 17 00:00:00 2001 From: Paul Hewlett Date: Thu, 15 Aug 2024 14:32:39 +0100 Subject: [PATCH] Add required swagger fields AB#9644 --- datatrails-common-api/assets/v2/assets/createasset.proto | 1 + datatrails-common-api/assets/v2/assets/createevent.proto | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/datatrails-common-api/assets/v2/assets/createasset.proto b/datatrails-common-api/assets/v2/assets/createasset.proto index 965993f..b39d0af 100644 --- a/datatrails-common-api/assets/v2/assets/createasset.proto +++ b/datatrails-common-api/assets/v2/assets/createasset.proto @@ -17,6 +17,7 @@ message CreateAssetRequest { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { description: "This describes the body of a request to create a new Asset." + // required is empty as all fileds are populated with defaults } example:"{ " "\"behaviours\": [\"RecordEvidence\"], " diff --git a/datatrails-common-api/assets/v2/assets/createevent.proto b/datatrails-common-api/assets/v2/assets/createevent.proto index c85b055..f18e1b9 100644 --- a/datatrails-common-api/assets/v2/assets/createevent.proto +++ b/datatrails-common-api/assets/v2/assets/createevent.proto @@ -17,6 +17,7 @@ message CreateEventRequest { description: "Request creating RecordEvidence event " "Specify `operation` to chose which RecordEvidence event to create " + required: ["uuid", "behaviour", "operation"] } example:"{ " "\"operation\": \"Record\", " @@ -82,4 +83,4 @@ message CreateEventRequest { pattern: "^[^[:cntrl:]]*?[^[[:cntrl:]]+?[^[:cntrl:]]$|^[^[:cntrl:]]$|^[^[:cntrl:]]*?[^][:cntrl:]]$" } ]; -} \ No newline at end of file +}