{"id":20301557,"url":"https://github.com/zero-one-group/injecto","last_synced_at":"2025-04-11T13:36:08.277Z","repository":{"id":65284068,"uuid":"588969470","full_name":"zero-one-group/injecto","owner":"zero-one-group","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-22T15:20:03.000Z","size":23,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T13:47:16.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/zero-one-group.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-14T16:36:11.000Z","updated_at":"2023-01-19T02:16:15.000Z","dependencies_parsed_at":"2024-11-14T16:33:26.399Z","dependency_job_id":"083848fd-f187-4c2c-bb70-ed4977591603","html_url":"https://github.com/zero-one-group/injecto","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"b2bc6e0b93a0b2fbcd866231a0eaebeaecddc349"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero-one-group%2Finjecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero-one-group%2Finjecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero-one-group%2Finjecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero-one-group%2Finjecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zero-one-group","download_url":"https://codeload.github.com/zero-one-group/injecto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410140,"owners_count":21098772,"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-11-14T16:26:31.306Z","updated_at":"2025-04-11T13:36:08.236Z","avatar_url":"https://github.com/zero-one-group.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Injecto\n\nA behaviour module that defines both an Ecto schema and a JSON schema.\n\nAn Injecto schema uses the module attribute `@properties` to define an Ecto schema and\na JSON schema based on the `ex_json_schema` library. In doing so, it also injects a\n`Jason` encoder implementation. The advantage of using an Injecto schema is to get a\nconsistent parsing and validating with Ecto changesets and JSON schema respectively\nwith minimal boilerplates. This consistency is helpful when working with struct-based\nrequest or response bodies, because we can get accurate Swagger schemas for free.\n\nExample:\n\n```elixir\ndefmodule Post do\n  @properties %{\n    title: {:string, required: true},\n    description: {:string, []},\n    likes: {:integer, required: true, minimum: 0}\n  }\n  use Injecto\nend\n```\n\nRefer to the [Injecto HexDocs](https://hexdocs.pm/injecto) for a more information.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `injecto` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:injecto, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzero-one-group%2Finjecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzero-one-group%2Finjecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzero-one-group%2Finjecto/lists"}