Skip to content

Commit da2527a

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

File tree

4 files changed

+448
-95
lines changed

4 files changed

+448
-95
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 fields 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: ["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: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,46 @@ 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
16-
github.com/google/uuid v1.4.0
17-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
14+
github.com/datatrails/go-datatrails-common v0.18.0
15+
github.com/envoyproxy/protoc-gen-validate v1.0.4
16+
github.com/google/uuid v1.6.0
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
20-
github.com/spf13/afero v1.3.3
20+
github.com/spf13/afero v1.10.0
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

3030
require (
31-
github.com/KimMachineGun/automemlimit v0.2.6 // indirect
3231
github.com/Masterminds/goutils v1.1.1 // indirect
3332
github.com/Masterminds/semver v1.5.0 // indirect
3433
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
35-
github.com/cilium/ebpf v0.9.1 // indirect
36-
github.com/containerd/cgroups/v3 v3.0.1 // indirect
37-
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
3834
github.com/davecgh/go-spew v1.1.1 // indirect
39-
github.com/docker/go-units v0.4.0 // indirect
40-
github.com/godbus/dbus/v5 v5.0.4 // indirect
4135
github.com/gogo/protobuf v1.3.2 // indirect
42-
github.com/golang/protobuf v1.5.3 // indirect
36+
github.com/golang/protobuf v1.5.4 // indirect
4337
github.com/huandu/xstrings v1.4.0 // indirect
44-
github.com/iancoleman/strcase v0.2.0 // indirect
38+
github.com/iancoleman/strcase v0.3.0 // indirect
4539
github.com/imdario/mergo v0.3.16 // indirect
4640
github.com/mitchellh/copystructure v1.2.0 // indirect
4741
github.com/mitchellh/reflectwalk v1.0.2 // indirect
4842
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
49-
github.com/opencontainers/runtime-spec v1.0.2 // indirect
5043
github.com/opentracing/opentracing-go v1.2.0 // indirect
5144
github.com/pmezard/go-difflib v1.0.0 // indirect
5245
github.com/pseudomuto/protokit v0.2.1 // indirect
53-
github.com/sirupsen/logrus v1.8.1 // indirect
54-
go.uber.org/automaxprocs v1.5.3 // indirect
46+
github.com/rogpeppe/go-internal v1.6.1 // indirect
5547
go.uber.org/multierr v1.10.0 // indirect
5648
go.uber.org/zap v1.25.0 // indirect
57-
golang.org/x/crypto v0.21.0 // indirect
58-
golang.org/x/mod v0.11.0 // indirect
59-
golang.org/x/net v0.21.0 // indirect
60-
golang.org/x/sys v0.18.0 // indirect
61-
golang.org/x/text v0.14.0 // indirect
62-
golang.org/x/tools v0.10.0 // indirect
63-
google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 // indirect
64-
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
49+
golang.org/x/crypto v0.25.0 // indirect
50+
golang.org/x/mod v0.17.0 // indirect
51+
golang.org/x/net v0.27.0 // indirect
52+
golang.org/x/sys v0.22.0 // indirect
53+
golang.org/x/text v0.16.0 // indirect
54+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
55+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
6556
)

0 commit comments

Comments
 (0)