{"id":17006429,"url":"https://github.com/mcruzdev/spring-yaml-getting-started","last_synced_at":"2026-04-12T03:02:43.508Z","repository":{"id":111698736,"uuid":"398140460","full_name":"mcruzdev/spring-yaml-getting-started","owner":"mcruzdev","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-20T03:23:15.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T10:51:30.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcruzdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-20T03:12:10.000Z","updated_at":"2021-09-30T04:59:27.000Z","dependencies_parsed_at":"2023-06-01T02:00:41.901Z","dependency_job_id":null,"html_url":"https://github.com/mcruzdev/spring-yaml-getting-started","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcruzdev/spring-yaml-getting-started","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fspring-yaml-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fspring-yaml-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fspring-yaml-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fspring-yaml-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcruzdev","download_url":"https://codeload.github.com/mcruzdev/spring-yaml-getting-started/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fspring-yaml-getting-started/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"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":"2024-10-14T05:05:49.986Z","updated_at":"2026-04-12T03:02:43.491Z","avatar_url":"https://github.com/mcruzdev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring YAML\n\n\n### GET /persons\n\nYou just need to add the content-type that you want to receive\n\napplication/json to receive JSON\n\ntext/yaml or text/yml to receive YAML \n\nBy default will returns JSON\n\n```\ncurl --request GET \\\n  --url http://localhost:8088/persons \\\n  --header 'Accept: '\n```\n### POST /persons\n\nAccept: text/yaml\nContent-Type: application/json\n\n```\ncurl --request POST \\\n  --url http://localhost:8088/persons \\\n  --header 'Accept: text/yaml' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"name\": \"Matheus\",\n\t\"age\": 26\n}'\n```\n\nReturns text/yaml\n\n---\n\nContent-Type: application/json\nAccept: application/json\n\n```\ncurl --request POST \\\n  --url http://localhost:8088/persons \\\n  --header 'Accept: application/json' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"name\": \"Matheus\",\n  \"age\": 26\n}'\n```\n\nReturns application/json\n\n---\n\nAccept: application/json\nContent-Type: text/yaml\n\n```\ncurl --request POST \\\n  --url http://localhost:8088/persons \\\n  --header 'Accept: application/json' \\\n  --header 'Content-Type: text/yaml' \\\n  --data 'name: Matheus Cruz\nage: 26'\n```\n\nReturns application/json\n\n--- \n\nAccept: text/yaml \nContent-Type: text/yaml\n\n```\ncurl --request POST \\\n  --url http://localhost:8088/persons \\\n  --header 'Accept: text/yaml' \\\n  --header 'Content-Type: text/yaml' \\\n  --data 'name: Matheus Cruz\nage: 26'\n```\n\nReturns text/yaml\n\n---\n\n- When Content-Type is application/json and the body is text/yaml \nI receive 400 Bad request\n\n- When Content-Type is text/yaml and the body is a application/json\nI receive 200 OK\n\n- When Content-Type is undefined returns 415 Unsupported Media Type\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcruzdev%2Fspring-yaml-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcruzdev%2Fspring-yaml-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcruzdev%2Fspring-yaml-getting-started/lists"}