{"id":16828592,"url":"https://github.com/pjfanning/swagger-akka-http-sample","last_synced_at":"2025-03-17T04:31:53.105Z","repository":{"id":44103919,"uuid":"50971285","full_name":"pjfanning/swagger-akka-http-sample","owner":"pjfanning","description":"Sample demonstrating use of swagger-akka-http","archived":false,"fork":false,"pushed_at":"2024-02-15T13:41:13.000Z","size":191,"stargazers_count":84,"open_issues_count":3,"forks_count":45,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-27T17:47:23.654Z","etag":null,"topics":["akka","akka-http","enumeratum","openapi","scala","swagger","swagger-akka-http"],"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/pjfanning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"pjfanning"}},"created_at":"2016-02-03T03:31:36.000Z","updated_at":"2024-03-17T22:59:54.000Z","dependencies_parsed_at":"2024-02-15T14:52:39.206Z","dependency_job_id":null,"html_url":"https://github.com/pjfanning/swagger-akka-http-sample","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/pjfanning%2Fswagger-akka-http-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjfanning%2Fswagger-akka-http-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjfanning%2Fswagger-akka-http-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjfanning%2Fswagger-akka-http-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjfanning","download_url":"https://codeload.github.com/pjfanning/swagger-akka-http-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841223,"owners_count":20356446,"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":["akka","akka-http","enumeratum","openapi","scala","swagger","swagger-akka-http"],"created_at":"2024-10-13T11:27:29.523Z","updated_at":"2025-03-17T04:31:52.844Z","avatar_url":"https://github.com/pjfanning.png","language":"Scala","funding_links":["https://github.com/sponsors/pjfanning"],"categories":[],"sub_categories":[],"readme":"# swagger-akka-http-sample\n\nCheck out this git repo and use `sbt run` to start the Akka Http server.\n\nUses [swagger-akka-http](https://github.com/swagger-akka-http/swagger-akka-http) which is built using [swagger.io](http://swagger.io/) libs.   \n\nTest using the Swagger UI at http://localhost:12345/api-docs. You can view the swagger doc itself at http://localhost:12345/api-docs/swagger.json and  http://localhost:12345/api-docs/swagger.yaml.\n\nThe [Swagger UI](https://swagger.io/tools/swagger-ui/) can be used to send sample requests.\n\nhttp://localhost:12345/api-docs redirects to https://petstore.swagger.io/ but provides a 'url' parameter that causes this sample's swagger.json to be loaded.\n\n[Swagger 1.5/1.6 version](https://github.com/pjfanning/swagger-akka-http-sample/tree/swagger-1.5)\n\n## Current swagger.json\n\n```\n{\n  \"openapi\" : \"3.0.1\",\n  \"info\" : {\n    \"title\" : \"\",\n    \"description\" : \"\",\n    \"termsOfService\" : \"\",\n    \"version\" : \"1.0\"\n  },\n  \"externalDocs\" : {\n    \"description\" : \"Core Docs\",\n    \"url\" : \"http://acme.com/docs\"\n  },\n  \"servers\" : [ {\n    \"url\" : \"http://localhost:12345\"\n  } ],\n  \"security\" : [ ],\n  \"paths\" : {\n    \"/add\" : {\n      \"post\" : {\n        \"summary\" : \"Add integers\",\n        \"description\" : \"Add integers\",\n        \"operationId\" : \"add\",\n        \"requestBody\" : {\n          \"content\" : {\n            \"application/json\" : {\n              \"schema\" : {\n                \"$ref\" : \"#/components/schemas/AddRequest\"\n              }\n            }\n          },\n          \"required\" : true\n        },\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Add response\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/AddResponse\"\n                }\n              }\n            }\n          },\n          \"500\" : {\n            \"description\" : \"Internal server error\"\n          }\n        }\n      }\n    },\n    \"/addOption\" : {\n      \"post\" : {\n        \"summary\" : \"Add integers\",\n        \"description\" : \"Add integers\",\n        \"operationId\" : \"addOption\",\n        \"requestBody\" : {\n          \"content\" : {\n            \"application/json\" : {\n              \"schema\" : {\n                \"$ref\" : \"#/components/schemas/AddOptionRequest\"\n              }\n            }\n          },\n          \"required\" : true\n        },\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Add response\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/AddOptionResponse\"\n                }\n              }\n            }\n          },\n          \"500\" : {\n            \"description\" : \"Internal server error\"\n          }\n        }\n      }\n    },\n    \"/echoenum\" : {\n      \"post\" : {\n        \"summary\" : \"Echo Enum\",\n        \"description\" : \"Echo Enum\",\n        \"operationId\" : \"echo\",\n        \"requestBody\" : {\n          \"content\" : {\n            \"application/json\" : {\n              \"schema\" : {\n                \"$ref\" : \"#/components/schemas/EchoEnum\"\n              }\n            }\n          },\n          \"required\" : true\n        },\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Echo Enum\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/EchoEnum\"\n                }\n              }\n            }\n          },\n          \"400\" : {\n            \"description\" : \"Bad Request\"\n          }\n        }\n      }\n    },\n    \"/echoenumeratum\" : {\n      \"post\" : {\n        \"summary\" : \"Echo Enumeratum\",\n        \"description\" : \"Echo Enumeratum\",\n        \"operationId\" : \"echo_1\",\n        \"requestBody\" : {\n          \"content\" : {\n            \"application/json\" : {\n              \"schema\" : {\n                \"$ref\" : \"#/components/schemas/EchoEnumeratum\"\n              }\n            }\n          },\n          \"required\" : true\n        },\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Echo Enumeratum\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/EchoEnumeratum\"\n                }\n              }\n            }\n          },\n          \"400\" : {\n            \"description\" : \"Bad Request\"\n          }\n        }\n      }\n    },\n    \"/echolist\" : {\n      \"post\" : {\n        \"summary\" : \"Echo List\",\n        \"description\" : \"Echo List\",\n        \"operationId\" : \"echo_2\",\n        \"requestBody\" : {\n          \"content\" : {\n            \"application/json\" : {\n              \"schema\" : {\n                \"$ref\" : \"#/components/schemas/EchoList\"\n              }\n            }\n          },\n          \"required\" : true\n        },\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Echo List\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/EchoList\"\n                }\n              }\n            }\n          },\n          \"400\" : {\n            \"description\" : \"Bad Request\"\n          }\n        }\n      }\n    },\n    \"/hello\" : {\n      \"get\" : {\n        \"summary\" : \"Return Hello greeting (anonymous)\",\n        \"description\" : \"Return Hello greeting for anonymous request\",\n        \"operationId\" : \"getHello\",\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Hello response\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/Greeting\"\n                }\n              }\n            }\n          },\n          \"500\" : {\n            \"description\" : \"Internal server error\"\n          }\n        }\n      }\n    },\n    \"/hello/{name}\" : {\n      \"get\" : {\n        \"summary\" : \"Return Hello greeting\",\n        \"description\" : \"Return Hello greeting for named user\",\n        \"operationId\" : \"getHelloSegment\",\n        \"parameters\" : [ {\n          \"name\" : \"name\",\n          \"in\" : \"path\",\n          \"description\" : \"user name\",\n          \"required\" : true,\n          \"schema\" : {\n            \"type\" : \"string\"\n          }\n        } ],\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"Hello response\",\n            \"content\" : {\n              \"application/json\" : {\n                \"schema\" : {\n                  \"$ref\" : \"#/components/schemas/Greeting\"\n                }\n              }\n            }\n          },\n          \"500\" : {\n            \"description\" : \"Internal server error\"\n          }\n        }\n      }\n    }\n  },\n  \"components\" : {\n    \"schemas\" : {\n      \"AddRequest\" : {\n        \"required\" : [ \"numbers\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"numbers\" : {\n            \"type\" : \"array\",\n            \"items\" : {\n              \"type\" : \"integer\",\n              \"format\" : \"int32\"\n            }\n          }\n        }\n      },\n      \"SeqString\" : {\n        \"type\" : \"array\",\n        \"items\" : {\n          \"type\" : \"string\"\n        }\n      },\n      \"Greeting\" : {\n        \"required\" : [ \"greeting\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"greeting\" : {\n            \"type\" : \"string\"\n          }\n        }\n      },\n      \"EchoList\" : {\n        \"required\" : [ \"listName\", \"values\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"listName\" : {\n            \"type\" : \"string\"\n          },\n          \"values\" : {\n            \"type\" : \"array\",\n            \"items\" : {\n              \"type\" : \"string\"\n            }\n          }\n        }\n      },\n      \"AddOptionResponse\" : {\n        \"required\" : [ \"sum\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"sum\" : {\n            \"type\" : \"integer\",\n            \"format\" : \"int32\"\n          }\n        }\n      },\n      \"AddOptionRequest\" : {\n        \"required\" : [ \"number\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"number\" : {\n            \"type\" : \"integer\",\n            \"format\" : \"int32\"\n          },\n          \"number2\" : {\n            \"type\" : \"integer\",\n            \"format\" : \"int32\"\n          }\n        }\n      },\n      \"EchoEnumeratum\" : {\n        \"required\" : [ \"enumValue\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"enumValue\" : {\n            \"type\" : \"string\",\n            \"enum\" : [ \"TALL\", \"GRANDE\", \"VENTI\" ]\n          }\n        }\n      },\n      \"EchoEnum\" : {\n        \"required\" : [ \"enumValue\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"enumValue\" : {\n            \"type\" : \"string\",\n            \"enum\" : [ \"TALL\", \"GRANDE\", \"VENTI\" ]\n          }\n        }\n      },\n      \"AddResponse\" : {\n        \"required\" : [ \"sum\" ],\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"sum\" : {\n            \"type\" : \"integer\",\n            \"format\" : \"int32\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjfanning%2Fswagger-akka-http-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjfanning%2Fswagger-akka-http-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjfanning%2Fswagger-akka-http-sample/lists"}