Skip to content

Commit 4ff3d64

Browse files
committed
Add required swagger fields
AB#9644
1 parent e48e5d8 commit 4ff3d64

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

datatrails-common-api/assets/v2/assets/createasset.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ message CreateAssetRequest {
1717
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
1818
json_schema: {
1919
description: "This describes the body of a request to create a new Asset."
20+
// required is empty as all fileds are populated with defaults
2021
}
2122
example:"{ "
2223
"\"behaviours\": [\"RecordEvidence\"], "

datatrails-common-api/assets/v2/assets/createevent.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ message CreateEventRequest {
1717
description:
1818
"Request creating RecordEvidence event "
1919
"Specify `operation` to chose which RecordEvidence event to create "
20+
required: ["uuid", "behaviour", "operation"]
2021
}
2122
example:"{ "
2223
"\"operation\": \"Record\", "
@@ -82,4 +83,4 @@ message CreateEventRequest {
8283
pattern: "^[^[:cntrl:]]*?[^[[:cntrl:]]+?[^[:cntrl:]]$|^[^[:cntrl:]]$|^[^[:cntrl:]]*?[^][:cntrl:]]$"
8384
}
8485
];
85-
}
86+
}

datatrails-common-api/go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ go 1.22
1111
// replace github.com/datatrails/go-datatrails-common-api-gen => ./
1212

1313
require (
14-
github.com/datatrails/go-datatrails-common v0.15.3
15-
github.com/envoyproxy/protoc-gen-validate v1.0.2
14+
github.com/datatrails/go-datatrails-common v0.17.1
15+
github.com/envoyproxy/protoc-gen-validate v1.0.4
1616
github.com/google/uuid v1.4.0
17-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
17+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
1818
github.com/lyft/protoc-gen-star/v2 v2.0.3
1919
github.com/pseudomuto/protoc-gen-doc v1.5.1
2020
github.com/spf13/afero v1.3.3
2121
github.com/stretchr/testify v1.9.0
2222
go.mongodb.org/mongo-driver v1.12.1
23-
google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4
24-
google.golang.org/grpc v1.59.0
23+
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094
24+
google.golang.org/grpc v1.65.0
2525
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
26-
google.golang.org/protobuf v1.31.0
26+
google.golang.org/protobuf v1.34.2
2727
gopkg.in/yaml.v3 v3.0.1
2828
)
2929

0 commit comments

Comments
 (0)