googleapis / googleapis/gapic-showcase

Add RPCs to verify unknown numeric enums in path params and body

Open
#1,212 1 comment 0 reactions 0 assignees View on GitHub
priority: p2 type: feature request
Dominant language
Go
Stars
183
Forks
55
Avg merge
1d 1h
Merged PRs (30d)
8

Description

The current [VerifyEnum](https://github.com/googleapis/gapic-showcase/blob/f303df5681a64905996c66819828dcceb7b17ed9/schema/google/showcase/v1beta1/compliance.proto#L122) works great for asserting that unknown numeric enums should be passed in as numbers, but it's only for enums in query params. We can add two more RPCs to verify unknown numeric enums in path params and body.
The RPCs may look like this
```
rpc VerifyEnumPath(EnumResponse) returns (EnumResponse) {
option (google.api.http) = {
post: "/v1beta1/compliance/enum/{continent}"
};
}

rpc VerifyEnumBody(EnumResponse) returns (EnumResponse) {
option (google.api.http) = {
post: "/v1beta1/compliance/enum"
body: "*"
};
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.