Skip to content

Commit

Permalink
Add required swagger fields
Browse files Browse the repository at this point in the history
AB#9644
  • Loading branch information
eccles committed Aug 15, 2024
1 parent e48e5d8 commit 223a553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions datatrails-common-api/assets/v2/assets/createasset.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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\"], "
Expand Down
3 changes: 2 additions & 1 deletion datatrails-common-api/assets/v2/assets/createevent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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\", "
Expand Down Expand Up @@ -82,4 +83,4 @@ message CreateEventRequest {
pattern: "^[^[:cntrl:]]*?[^[[:cntrl:]]+?[^[:cntrl:]]$|^[^[:cntrl:]]$|^[^[:cntrl:]]*?[^][:cntrl:]]$"
}
];
}
}

0 comments on commit 223a553

Please sign in to comment.