Skip to content

fwang144/script-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Configuration Validator

A modular Bash-based utility designed to automate the validation of JSON schema requirements across a project directory. This tool demonstrates the use of functional libraries, shell scripting, and automated file discovery.


Getting Started

1. Installation & Setup

Clone the repository and ensure the scripts have the correct execution permissions:

chmod +x bin/validate_json.sh
chmod +x lib/tools.sh

2. Project Structure

The application uses a modular architecture to separate logic from utility functions:

bin/validate_json.sh: The main execution script containing the validation loops.

lib/tools.sh: A shared library providing standardized error handling (error_msg).

3. Create Your Test Data

Run these commands in the terminal to create a "Good" and "Bad" file:

echo '{"version": "1.0", "author": "Student"}' > config_good.json
echo '{"name": "test_app"}' > config_bad.json

4. Execution

Run the validator from the project root:

./bin/validate_json.sh

5. Output

Determine if the output for the json files test are perfect:

Starting JSON Schema Validation...
PASS: ./data/config_v1.json
PASS: ./settings/user_profile.json
ERROR [2026-03-24 20:20:45]: Mandatory 'version' key missing in ./temp/old_config.json
Validation Complete.

Credits & Acknowledgments

  • Lead Developer: [Fred Wang/fwang144]

  • Course: IT 135 - Application Development, North Seattle College

  • Technical Assistant: Gemini (AI Collaborator) – Assisted with script modularization, sourcing logic, and README documentation. Version: 1.2.1

    Updated: March 24, 2026

About

A repo on which to build scripting projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%