Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required swagger fields #34

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 fields 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: ["behaviour", "operation"]
}
example:"{ "
"\"operation\": \"Record\", "
Expand Down Expand Up @@ -82,4 +83,4 @@ message CreateEventRequest {
pattern: "^[^[:cntrl:]]*?[^[[:cntrl:]]+?[^[:cntrl:]]$|^[^[:cntrl:]]$|^[^[:cntrl:]]*?[^][:cntrl:]]$"
}
];
}
}
45 changes: 18 additions & 27 deletions datatrails-common-api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,46 @@ go 1.22
// replace github.com/datatrails/go-datatrails-common-api-gen => ./

require (
github.com/datatrails/go-datatrails-common v0.15.3
github.com/envoyproxy/protoc-gen-validate v1.0.2
github.com/google/uuid v1.4.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
github.com/datatrails/go-datatrails-common v0.18.0
github.com/envoyproxy/protoc-gen-validate v1.0.4
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
github.com/lyft/protoc-gen-star/v2 v2.0.3
github.com/pseudomuto/protoc-gen-doc v1.5.1
github.com/spf13/afero v1.3.3
github.com/spf13/afero v1.10.0
github.com/stretchr/testify v1.9.0
go.mongodb.org/mongo-driver v1.12.1
google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4
google.golang.org/grpc v1.59.0
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094
google.golang.org/grpc v1.65.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/KimMachineGun/automemlimit v0.2.6 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/containerd/cgroups/v3 v3.0.1 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/godbus/dbus/v5 v5.0.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/iancoleman/strcase v0.2.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pseudomuto/protokit v0.2.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
github.com/rogpeppe/go-internal v1.6.1 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
)
Loading
Loading