scheme_filler

Version, currently main branch1 version
  • main branchlatestApr 19, 2023

github.com/BrightSec/scheme_filler

A simple CLI tool for populating an OpenAPI scheme from HAR

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  scheme_filler:
    github: BrightSec/scheme_filler
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.8.0
License
MIT
Author
Bar Hofesh
Target
  • scheme_filler from src/scheme_filler.cr

Dependencies

Runtime Dependencies

  • har*github: NeuraLegion/har
  • swagger*github: icyleaf/swagger

README

scheme_filler

scheme_filler is a CLI tool that helps you populate an OpenAPI 3.0.0 schema with example values. It does so by accepting an HAR file and a schema file, and then generating a new schema file with the example values.

Installation

From Source

  1. Install Crystal
  2. git clone this repo
  3. cd into the repo
  4. shards build

Docker Image

  1. clone the repo
  2. cd into the repo
  3. docker build -t neuralegion/scheme_filler .

Usage

Binary

bin/scheme_filler <scheme_file> <har_file> will generate a new schema file with the example values.

Docker

docker run -v <path_to_schema_file>:/tmp/schema.json -v <path_to_har_file>:/tmp/har.json neuralegion/scheme_filler /tmp/schema.json /tmp/har.json will generate a new schema file with the example values.

Contributing

  1. Fork it (https://github.com/NeuraLegion/scheme_filler/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors