grpc_required_annotator 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/grpc_required_annotator/required.rb +1 -1
- data/lib/grpc_required_annotator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd1246c98165921dbf652addda169f842407a316e8214b3477f35a64bcc0b68a
|
4
|
+
data.tar.gz: 88e617dec060ade60eb6cab2255d61548296d438bc60c6339f1940ed6861522f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52ce00aa26b0af1eb7aaca19124366b291cc934bfd3860fe9ea02884af11994797ac1b115990704b887030b5e81a9aaff16c09f478cfb20b181cf9158c42d37
|
7
|
+
data.tar.gz: 1a312099330e8dea9c8e38c65e40f47bc00b21368b3f28d5134fd156259c3a6449be4e901aa5dc7c59768e53c203dcc9e592473a5e5fd22b0278ac25dad0cc85
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# GrpcRequiredAnnotator [![Gem Version](https://badge.fury.io/rb/grpc_required_annotator.svg)](https://badge.fury.io/rb/grpc_required_annotator) [![Build Status](https://travis-ci.com/euglena1215/grpc_required_annotator.svg?branch=master)](https://travis-ci.com/euglena1215/grpc_required_annotator) [![codecov](https://codecov.io/gh/euglena1215/grpc_required_annotator/branch/master/graph/badge.svg)](https://codecov.io/gh/euglena1215/grpc_required_annotator)
|
2
2
|
|
3
|
-
GrpcRequiredAnnotator is
|
3
|
+
GrpcRequiredAnnotator is an annotator for null validation of gRPC requests using `required`.
|
4
4
|
|
5
5
|
### Supported Types
|
6
6
|
|
7
7
|
- Integer (int64, int32, etc...)
|
8
8
|
- String (string)
|
9
9
|
- Google::Protobuf::FieldMask (field_mask)
|
10
|
-
-
|
10
|
+
- Google::Protobuf::RepeatedField (repeated fields)
|
11
11
|
- Symbol (enum)
|
12
12
|
|
13
13
|
### Unsupported Types
|
@@ -26,7 +26,7 @@ module GrpcRequiredAnnotator
|
|
26
26
|
raise GRPC::InvalidArgument.new("`#{field}` is required") if value == ""
|
27
27
|
when Google::Protobuf::FieldMask
|
28
28
|
raise GRPC::InvalidArgument.new("`#{field}` is required") if value.paths.empty?
|
29
|
-
when
|
29
|
+
when Google::Protobuf::RepeatedField
|
30
30
|
raise GRPC::InvalidArgument.new("`#{field}` is required") if value.empty?
|
31
31
|
when Symbol
|
32
32
|
raise GRPC::InvalidArgument.new("`#{field}` is required") if value.to_s.include?("UNSPECIFIED") # https://developers.google.com/protocol-buffers/docs/style#enums
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc_required_annotator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shintani Teppei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|