{"id":27399948,"url":"https://github.com/tattn/mergeable","last_synced_at":"2026-05-02T03:09:14.329Z","repository":{"id":79144628,"uuid":"112099630","full_name":"tattn/Mergeable","owner":"tattn","description":"Mergeable is a protocol which can merge multiple models.","archived":false,"fork":false,"pushed_at":"2017-11-26T18:17:04.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T03:39:37.860Z","etag":null,"topics":["codable","ios","macos","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/tattn.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,"zenodo":null}},"created_at":"2017-11-26T16:47:49.000Z","updated_at":"2019-08-25T15:29:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"65fc8ad6-258b-4b67-9a56-2cedce0ca298","html_url":"https://github.com/tattn/Mergeable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tattn/Mergeable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FMergeable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FMergeable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FMergeable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FMergeable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tattn","download_url":"https://codeload.github.com/tattn/Mergeable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FMergeable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["codable","ios","macos","swift"],"created_at":"2025-04-14T03:25:24.025Z","updated_at":"2026-05-02T03:09:14.324Z","avatar_url":"https://github.com/tattn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mergeable\n===\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Version](https://img.shields.io/badge/Swift-4-F16D39.svg)](https://developer.apple.com/swift)\n\n\nMergeable is a protocol which can merge multiple models.\n\n```swift\nstruct APIResponse: Encodable {\n    let id: Int\n    let title: String\n    let foo: String\n}\n\nstruct APIResponse2: Encodable {\n    let tags: [String]\n}\n\nstruct Model: Decodable, Mergeable {\n    let id: Int\n    let title: String\n    let tags: [String]\n}\n\nlet response = APIResponse(id: 0, title: \"にゃーん\", foo: \"bar\")\nlet response2 = APIResponse2(tags: [\"swift\", \"ios\", \"macos\"])\nlet model = try Model.merge(response, response2)\n\nXCTAssertEqual(model.id, response.id)\nXCTAssertEqual(model.title, response.title)\nXCTAssertEqual(model.tags, response2.tags)\n```\n\n## \n\n# Installation\n\n## Carthage\n\n```ruby\ngithub \"tattn/Mergeable\"\n```\n\n\n# Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n# License\n\nMergeable is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattn%2Fmergeable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftattn%2Fmergeable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattn%2Fmergeable/lists"}