https://github.com/saturncloud/recipes
For json schemas describing Saturn Cloud objects
https://github.com/saturncloud/recipes
Last synced: about 1 month ago
JSON representation
For json schemas describing Saturn Cloud objects
- Host: GitHub
- URL: https://github.com/saturncloud/recipes
- Owner: saturncloud
- Created: 2021-09-30T14:27:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-06T15:46:29.000Z (over 2 years ago)
- Last Synced: 2024-04-16T02:03:26.078Z (about 2 years ago)
- Language: Python
- Homepage: https://saturncloud.io/docs/using-saturn-cloud/recipes/
- Size: 107 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Object schemas
With our customers increasingly interested in infrastructure-as-code and not having to use the UI, it's become apparent that
.Dockerfile-like ways of specifying objects in Saturn Cloud would be useful. This repo is to store the specifications of those
## Resources
For resources, they can be specified with one or more files:
* `recipe.json` (required) - a json file that specifies how the resource should be created. This should fully encapsulate all of the parameters you can set in the UI.
Here is how you would validate the example using the schema for resources in Python:
```python
import json
from jsonschema import validate
with open('resources/schema.json') as f:
schema = json.load(f)
with open('resources/example.json') as f:
instance = json.load(f)
validate(instance=instance, schema=schema)
```