issues
search
spacecloud-io
/
space-cloud
Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes
https://space-cloud.io
Apache License 2.0
3.94k
stars
222
forks
source link
Ability to perform schema validation for config CRUD APIs
#1660
Open
YourTechBud
opened
1 year ago
YourTechBud
commented
1 year ago
Challenge
No way to do a schema check for configs being written when using non K8s config adapters.
Solution
Add a json schema / openapi validation step for the apply config endpoint.
We can use the
JSON schema reflection library
to figure out the schema of a source when it registers itself with the
Source Manager
.
Source Manager
can store the json schema generated in a global map against the gvr
Handler for config apply endpoint can fetch this jsonschema from the
Source Manager
App before passing the data to the
ConfigManager
Challenge
Solution
Source Manager
.Source Manager
can store the json schema generated in a global map against the gvrSource Manager
App before passing the data to theConfigManager