{"id":21090925,"url":"https://github.com/gjerokrsteski/go-contract-validator","last_synced_at":"2026-05-03T17:35:07.653Z","repository":{"id":144276958,"uuid":"153506397","full_name":"gjerokrsteski/go-contract-validator","owner":"gjerokrsteski","description":"A cli app that implements HTTP service for validating JSON entities by given JSON Schema.","archived":false,"fork":false,"pushed_at":"2018-10-28T20:26:26.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T04:59:52.607Z","etag":null,"topics":["go","golang","http-server","json-parser","json-schema","microservice","validator"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gjerokrsteski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-17T18:41:24.000Z","updated_at":"2021-10-28T13:38:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d80fceae-f826-4629-9b0c-60a80303a34b","html_url":"https://github.com/gjerokrsteski/go-contract-validator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gjerokrsteski/go-contract-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjerokrsteski%2Fgo-contract-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjerokrsteski%2Fgo-contract-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjerokrsteski%2Fgo-contract-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjerokrsteski%2Fgo-contract-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gjerokrsteski","download_url":"https://codeload.github.com/gjerokrsteski/go-contract-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjerokrsteski%2Fgo-contract-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32578860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","http-server","json-parser","json-schema","microservice","validator"],"created_at":"2024-11-19T21:42:09.058Z","updated_at":"2026-05-03T17:35:07.637Z","avatar_url":"https://github.com/gjerokrsteski.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contract-validator [![Build Status](https://travis-ci.org/gjerokrsteski/go-contract-validator.svg?branch=master)](https://travis-ci.org/gjerokrsteski/go-contract-validator) [![Go Report Card](https://goreportcard.com/badge/github.com/gjerokrsteski/go-contract-validator)](https://goreportcard.com/report/github.com/gjerokrsteski/go-contract-validator)\nA cli app that implements HTTP service for validating JSON entities by given JSON Schema.\n\nThe binary is compiled for all Linux distributions which rely on amd64 process-architecture. \nIt listens on the TCP network address and then calls Serve with handler to handle requests \non incoming connections.\n\n## Download \u0026 Run\n\n[Download latest release](https://github.com/gjerokrsteski/go-contract-validator/releases)\n\n\n## Explorer the service\n\n```\n./contract-validator --help\n\nUsage of ./contract-validator:\n  -jsonSchema string\n        absolute path to JSON schema file (default \"./\")\n  -port string\n        port number to the host (default \"6565\")\n  -version\n        prints current version\n\n```\n\n## Start the service (default port is 6565)\n\n```\n./contract-validator -port=6565 -jsonSchema=file://${PWD}/_fixtures/product-schema.json\n```\n\n## Validate JSON data\n```\ncurl -X POST \"http://localhost:6565/validate\" -d \"{\"id\":1,\"name\":\"A green door\",\"price\": 12.50,\"tags\": [\"home\", \"green\"]}\"\n```\nFor example you can use `curl` to execute an request to `http://localhost:6565/validate` using HTTP request method `POST` \nand an JSON data as request body.\n\n*Possible responses are:*\n- 400 Bad Request: if JSON data is empty.\n- 422 Unprocessable Entity: if JSON schema or data are not valid. A list of vulnerabilities is responded within response body.\n- 200 OK: if JSON data is valid.\n\n# Development\nFor developing and contributing you need [Golang 1.9.1](https://golang.org/) installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjerokrsteski%2Fgo-contract-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjerokrsteski%2Fgo-contract-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjerokrsteski%2Fgo-contract-validator/lists"}