A CLI tool to interactively generate JSON and YAML files from JSON schemas
pip install python-steer
Let's say you want to build an OpenAPI specification for an API.
- Download the OpenAPI json schema from here
- Run steer from the command line
This is still very much in alpha. There is still a lot of work to implement all the json schema specifications. It is usable for a few use cases without major issues.
- Implement prompt for
array
ofstring
,number
andinteger
property type - Implement prompt for
array
ofobject
property type - Implement the
$ref
property type - Validate string property values with
pattern
- Implement object with
additionalProperties
- Validate
required
fields - Implement
number
property type - Implement
allOf
,anyOf
,oneOf
keywords
Here are some examples where this tool might be useful.
If you're deploying to Kubernetes using a helm chart, instead of going through the charts documentation to set your values, you could use this tool to interactively set up the values.yaml
file for the chart.
steer chart.schema.json --output-type yaml --output-file values.yaml
...
When building an API with the OpenAPI specification you can use this tool to design your API's endpoints.
steer openapi.schema.json --output-type yaml --output-file rest-api.yaml
...
This can help you define your CICD configuration file for different systems like GitHub Actions, CircleCI, GitLab CI, etc.
steer circleci.schema.json --output-type yaml --output-file config.yml
...