guardrail-dev / guardrail-dev/guardrail
schema template
- Dominant language
- Scala
- Stars
- 541
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
Hi I have a question regarding the response json schema. I'm not sure if that's more swagger related or guardrail can somehow tweak it to work
Let's say we have a ton of endpoints and all of them follow a schema template
```
{
"code": 0,
"message": "some message",
"data": T
}
```
what's worse is that the type T could be another schema template for example
```
{
"code": 0,
"message": "some message",
"data": {
"page": 1,
"pageSize": 10
"totalSize": 15
"data": T
}
}
```
what I'm doing right now is re-writing the same response schema def for each endpoint. Is it possible to generalize and only define this template once?
Contributor guide
Assessment
This issue has not been assessed yet.