{"id":29955054,"url":"https://github.com/foca/granola-schema","last_synced_at":"2025-08-03T17:09:39.185Z","repository":{"id":30043789,"uuid":"33592923","full_name":"foca/granola-schema","owner":"foca","description":"JSON Schema support for Granola serialisers","archived":false,"fork":false,"pushed_at":"2015-04-08T08:09:13.000Z","size":120,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-04-10T10:19:51.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foca.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":"2015-04-08T07:57:37.000Z","updated_at":"2017-01-06T15:09:22.000Z","dependencies_parsed_at":"2022-09-17T21:42:00.289Z","dependency_job_id":null,"html_url":"https://github.com/foca/granola-schema","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/foca/granola-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fgranola-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fgranola-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fgranola-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fgranola-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foca","download_url":"https://codeload.github.com/foca/granola-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Fgranola-schema/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268578914,"owners_count":24273089,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-03T17:09:24.274Z","updated_at":"2025-08-03T17:09:39.168Z","avatar_url":"https://github.com/foca.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Granola \u0026lt;3 JSON Schema [![Build Status](https://img.shields.io/travis/foca/granola-schema.svg)](https://travis-ci.org/foca/granola-schema) [![RubyGem](https://img.shields.io/gem/v/granola-schema.svg)](https://rubygems.org/gems/granola-schema)\n\nSupport for defining [JSON schema][schema] for your Granola serializers.\n\n[schema]: http://json-schema.org\n\n## Example\n\n``` ruby\nrequire \"granola/schema\"\n\nclass PersonSerializer \u003c Granola::Serializer\n  def self.schema\n    {\n      \"type\" =\u003e \"object\",\n      \"required\" =\u003e [\"name\", \"email\"],\n      \"properties\" =\u003e {\n        \"name\" =\u003e { \"type\" =\u003e \"string\" },\n        \"email\" =\u003e { \"type\" =\u003e \"string\" },\n        \"age\" =\u003e { \"type\" =\u003e \"integer\" },\n      }\n    }\n  end\n\n  def data\n    {\n      \"name\" =\u003e object.name,\n      \"email\" =\u003e object.email,\n      \"age\" =\u003e object.age\n    }\n  end\nend\n\nserializer = PersonSerializer.new(person)\nserializer.valid? #=\u003e true\n```\n\n## Install\n\n    gem install granola-schema\n\n## License\n\nThis project is shared under the MIT license. See the attached [LICENSE][] file\nfor details.\n\n[LICENSE]: ./LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Fgranola-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoca%2Fgranola-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Fgranola-schema/lists"}