Skip to content

A CLI tool to interactively generate JSON and YAML files from JSON schemas

License

Notifications You must be signed in to change notification settings

jcoelho93/steer

Repository files navigation

Steer

PyPI - Version PyPI - Python Version PyPI - Downloads Security Rating Vulnerabilities Coverage

A CLI tool to interactively generate JSON and YAML files from JSON schemas

Installation

pip install python-steer

Usage

Let's say you want to build an OpenAPI specification for an API.

  1. Download the OpenAPI json schema from here
  2. Run steer from the command line

asciicast

Roadmap

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 of string, number and integer property type
  • Implement prompt for array of object 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

Use cases

Here are some examples where this tool might be useful.

Helm chart values

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
...

OpenAPI Specification

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
...

Writing CICD configuration

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
...

About

A CLI tool to interactively generate JSON and YAML files from JSON schemas

Topics

Resources

License

Stars

Watchers

Forks

Languages