{"id":18936409,"url":"https://github.com/vaporexampleslab/example-so-vaporjsonresponse","last_synced_at":"2026-03-21T03:30:15.600Z","repository":{"id":133115004,"uuid":"147971679","full_name":"VaporExamplesLab/Example-SO-VaporJsonResponse","owner":"VaporExamplesLab","description":"Working example for StackOverflow question \"Making Vapor API response JSON API Spec compliant\".","archived":false,"fork":false,"pushed_at":"2021-05-31T03:39:13.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T21:26:27.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://stackoverflow.com/questions/52232746/making-vapor-api-response-json-api-spec-compliant","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/VaporExamplesLab.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":"2018-09-08T21:36:03.000Z","updated_at":"2023-04-11T07:49:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0ea4076-0454-4b73-9baa-b77b605e60a3","html_url":"https://github.com/VaporExamplesLab/Example-SO-VaporJsonResponse","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/VaporExamplesLab%2FExample-SO-VaporJsonResponse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaporExamplesLab%2FExample-SO-VaporJsonResponse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaporExamplesLab%2FExample-SO-VaporJsonResponse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VaporExamplesLab%2FExample-SO-VaporJsonResponse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VaporExamplesLab","download_url":"https://codeload.github.com/VaporExamplesLab/Example-SO-VaporJsonResponse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239937702,"owners_count":19721482,"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-08T12:07:22.980Z","updated_at":"2026-03-21T03:30:15.541Z","avatar_url":"https://github.com/VaporExamplesLab.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example-SO-VaporJsonResponse\n\n`Example-SO-VaporJsonResponse` provides a working example for the StackOverflow question [\"Making Vapor API response JSON API Spec compliant\"](https://stackoverflow.com/questions/52232746/making-vapor-api-response-json-api-spec-compliant).\n\nEach `class` and/or `struct` in the compound object `ApiResponse` complies with the `Content` protocol. The `Content` protocol includes the `Codable` protocol for JSON decoding and encoding. \n\nThe `POST` was checked with the [RESTed](https://apps.apple.com/us/app/rested-simple-http-requests/id421879749) macOS application using the file [\"Dish.request\"](Dish.request).\n\n``` sh\ncurl -i -X POST \"http://127.0.0.1:8080/api/dish\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"course\": \"salad\", \\\n        \"description\": \"flavorful Southwestern ethos\", \\\n        \"price\": 1.82, \"title\": \"Aztec Salad\"}'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaporexampleslab%2Fexample-so-vaporjsonresponse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaporexampleslab%2Fexample-so-vaporjsonresponse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaporexampleslab%2Fexample-so-vaporjsonresponse/lists"}