{"id":13788116,"url":"https://github.com/aavarghese/opa-schema-examples","last_synced_at":"2026-01-22T17:58:57.173Z","repository":{"id":48323794,"uuid":"327961080","full_name":"aavarghese/opa-schema-examples","owner":"aavarghese","description":"Example files for supporting schema type checking for OPA","archived":false,"fork":false,"pushed_at":"2021-08-01T13:04:55.000Z","size":72879,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-18T02:37:02.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Open Policy Agent","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aavarghese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-08T16:52:58.000Z","updated_at":"2023-09-12T20:11:15.000Z","dependencies_parsed_at":"2022-09-06T12:40:58.671Z","dependency_job_id":null,"html_url":"https://github.com/aavarghese/opa-schema-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aavarghese%2Fopa-schema-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aavarghese%2Fopa-schema-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aavarghese%2Fopa-schema-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aavarghese%2Fopa-schema-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aavarghese","download_url":"https://codeload.github.com/aavarghese/opa-schema-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253662771,"owners_count":21944127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T21:00:37.043Z","updated_at":"2026-01-22T17:58:57.127Z","avatar_url":"https://github.com/aavarghese.png","language":"Open Policy Agent","readme":"# opa-schema-examples\n\nA new feature allows Rego's type system to take into account the schemas for input documents. This adds precision to type checking and helps prevent errors when writing Rego code. It helps users by rejecting erroneous code statically and improving developer productivity. It uses JSON Schema as the format for providing schemas.\n\nThis repo contains example files to illustrate the new feature.\n\n## How to run\n\nWe added a new query argument to `opa eval` to support uploading of a single schema for the input document in JSON Schema format.\n\n```\n-s, --schema string set schema file path\n```\n\n## Examples\n\n\n```\nopa eval --format pretty data.example.public_server -i opa-example/input.json -d opa-example/example.rego -s opa-example/input-schema.json\n```\n\n```\nopa eval --format pretty data.kubernetes.admission.deny -i kubernetes/admission-review.json -d kubernetes/pod.rego -s kubernetes/admission-schema.json\n```\n\n```\nopa eval --format pretty data.terraform.analysis.authz -i terraform/tf-plan.json -d terraform/terraform.rego -s terraform/tf-schema.json\n```\n","funding_links":[],"categories":["Tools and Utilities"],"sub_categories":["Serverless Blogs and Articles","Testing Blogs and Articles"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faavarghese%2Fopa-schema-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faavarghese%2Fopa-schema-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faavarghese%2Fopa-schema-examples/lists"}