{"id":18785575,"url":"https://github.com/d-exclaimation/data-transfer-object","last_synced_at":"2026-05-18T11:07:22.035Z","repository":{"id":103062161,"uuid":"393715716","full_name":"d-exclaimation/data-transfer-object","owner":"d-exclaimation","description":"Preferred data transfer object schema","archived":false,"fork":false,"pushed_at":"2021-08-07T16:47:37.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T12:39:19.819Z","etag":null,"topics":["dto","json-schema","polyglot"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/d-exclaimation.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":"2021-08-07T15:08:20.000Z","updated_at":"2022-11-08T18:04:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7a4a5fa-f95f-4862-a1b0-a65cf61968a8","html_url":"https://github.com/d-exclaimation/data-transfer-object","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/d-exclaimation%2Fdata-transfer-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fdata-transfer-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fdata-transfer-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fdata-transfer-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-exclaimation","download_url":"https://codeload.github.com/d-exclaimation/data-transfer-object/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239701806,"owners_count":19682975,"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":["dto","json-schema","polyglot"],"created_at":"2024-11-07T20:48:49.333Z","updated_at":"2026-05-18T11:07:21.993Z","avatar_url":"https://github.com/d-exclaimation.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data-Transfer-Object (Protocol / Standard for REST APIs)\n\nHow I would like to format my JSON Responses to take account for errors and predictable schema.\n\n\n## Features\n\nPredictable response schema to allow for:\n- Better Typing on client-side\n- Parseable and handleable errors\n  \n## Acknowledgements\n\nThis protocol / standard is basically the same as [GraphQL's Response Protocol](https://spec.graphql.org/June2018/#sec-Response-Format).\n\nThe basics of this are that JSON Responses should be shaped as\n|Field|Type|Description|\n|-|-|-|\n|data|`Successful object` **or** `null`|The expected return object or null for failure to get any result|\n|errors|`Arrays of error object` **or** `null`|Error(s) occurred during the process described as usually string or custom object|\n\nThis way, it's easier to guess what's going on, parsing a proper JSON Response wouldn't throw an error with bad explanations and instead can directly get the error responses.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-exclaimation%2Fdata-transfer-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-exclaimation%2Fdata-transfer-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-exclaimation%2Fdata-transfer-object/lists"}