Define validation annotations and required fields
Open
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
I need to define OpenAPI validation annotations on my API resources such as `minLength`, `minItems` and also specify the `required` fields
e.x:
```
components:
schemas:
Resource:
required:
- foo
- bar
type: object
properties:
foo:
type: string
description: Some description about foo
minLength: 1
maxLength: 200
```
My proto would look like:
```
Message SomeProto {
string foo = 1; // need to define minLength and maxLength
string bar = 2;
}
```
Is it possible to define these annotations on the proto?
Contributor guide
Assessment
This issue has not been assessed yet.