{"id":26768104,"url":"https://github.com/raphox/grape-swagger-doc","last_synced_at":"2025-03-28T21:19:37.679Z","repository":{"id":147508853,"uuid":"48196812","full_name":"raphox/grape-swagger-doc","owner":"raphox","description":null,"archived":false,"fork":false,"pushed_at":"2015-12-18T17:15:47.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-17T01:08:35.488Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/raphox.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}},"created_at":"2015-12-17T20:32:28.000Z","updated_at":"2015-12-17T20:33:30.000Z","dependencies_parsed_at":"2023-04-16T08:05:56.390Z","dependency_job_id":null,"html_url":"https://github.com/raphox/grape-swagger-doc","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/raphox%2Fgrape-swagger-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fgrape-swagger-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fgrape-swagger-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fgrape-swagger-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphox","download_url":"https://codeload.github.com/raphox/grape-swagger-doc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100578,"owners_count":20723479,"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":"2025-03-28T21:19:37.132Z","updated_at":"2025-03-28T21:19:37.674Z","avatar_url":"https://github.com/raphox.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"API to expose service for external enviroments and API clients.\n\nTo cosume the API the first step is get a Token on authentication service.\n\n# Authentication\n\nAll services requires the header \"Authorization\". To generate a value to \"Authorization\" you need a valid user and password. In such data can you will generate the Token sending them for using Authentication service. Such as:\n\n~~~ sh\n# Request\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n  \"username\": \"Alberto\",\n  \"password\": \"alberto1234\",\n  \"country\": \"PT\"\n}' http://192.168.254.2:3000/api/auth/login\n\n# Response\n{\n  \"id\": 61,\n  \"name\": \"Alberto Ferreira\",\n  \"login\": \"Alberto\",\n  \"email\": \"portugal@deco.proteste.pt\",\n  \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2xvZ2luIjoiQWxiZXJ0byI...\",\n  \"country\":\n      {\n          \"id\": 2,\n          \"name\": \"Portugal\"\n      }\n}\n~~~\n\nTake the 'token' attribute of the response and the user in future requests. Such as:\n\n~~~ sh\ncurl -X GET -H \"Content-Type: application/json\" \\\n-H \"Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2xvZ2luI...\" \\\nhttp://192.168.254.2:3000/api/projects\n~~~\n\n# Possible API returns\n\n## Success\n\nYou can receive 3 type of success response for GET requests. They are:\n\n### Empty body\n\nIn some cases, the requests do not require data return beyond the success:\n\n~~~ json\n{\n  \"success\": true,\n  \"message\": string|null\n}\n~~~\n\n### One object\n\nWhen you request only one object:\n\n~~~ json\n{\n  \"foo\": string|integer|float|null,\n  \"bar\": string|integer|float|null\n}\n~~~\n\n### Collection of objects\n\nWhen you request more than one object or when the response to the request is more than one object:\n\n~~~ json\n{\n  \"total\": integer,\n  \"total_pages\": integer,\n  \"page\": integer,\n  \"per_page\": integer,\n  \"paging\": {\n    \"next\": integer|null,\n    \"previous\": integer|null,\n    \"first\": integer,\n    \"last\": integer\n  },\n  \"data\": [\n    {\n      \"foo\": string|integer|float|null,\n      \"bar\": string|integer|float|null\n    },\n    ...\n  ]\n}\n~~~\n\n## Errors\n\nThe error occurrences (which does not often occur) have standard format:\n\n~~~ json\n{\n  \"code\": string,\n  \"message\": string|null,\n  \"details\": string|null,\n  \"success\": false\n}\n~~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphox%2Fgrape-swagger-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphox%2Fgrape-swagger-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphox%2Fgrape-swagger-doc/lists"}