{"id":27056483,"url":"https://github.com/damesek/swagger-http-kit-compojure-api","last_synced_at":"2025-04-05T10:17:49.537Z","repository":{"id":194030558,"uuid":"88665534","full_name":"damesek/swagger-http-kit-compojure-api","owner":"damesek","description":"Compojure API test and Swagger API integration example (works with uberjar)","archived":false,"fork":false,"pushed_at":"2017-04-18T20:25:53.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-09-12T10:42:15.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damesek.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}},"created_at":"2017-04-18T20:02:03.000Z","updated_at":"2017-05-04T14:31:58.000Z","dependencies_parsed_at":"2023-09-11T10:36:24.157Z","dependency_job_id":null,"html_url":"https://github.com/damesek/swagger-http-kit-compojure-api","commit_stats":null,"previous_names":["damesek/swagger-http-kit-compojure-api"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fswagger-http-kit-compojure-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fswagger-http-kit-compojure-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fswagger-http-kit-compojure-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fswagger-http-kit-compojure-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damesek","download_url":"https://codeload.github.com/damesek/swagger-http-kit-compojure-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318729,"owners_count":20919483,"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-04-05T10:17:48.966Z","updated_at":"2025-04-05T10:17:49.502Z","avatar_url":"https://github.com/damesek.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger and Compojure API with Clojure Http-kit \nCompojure API test and Swagger API integration example (work with uberjar compile)\n\nI found just Arttuka http-kit swagger tutorial. `https://github.com/arttuka/swagger-httpkit-test`. End of this tutorial you can read: \"Doesn't currently work because of a suspected problem in compojure-api and AOT compiling.\" \n\n.. that wasn't good news for me .. and not so happy! I try to find a solution for this. That is my quick demonstration how works the swagger/ compojure-api with http-kit. Plus you can compile with uberjar.\n\nFirst way to create REST-API:\n```\n(GET \"/apitest\" [challenge :as request]\n     (let [challenge (or (get-in request [:params :challenge])\n                        (get-in request [:body :challenge])\n                         \"John Doe\")]\n      {:status 200\n       :body [challenge]}))\n```\nSecond way with Swagger:\n\n```\n(POST \"/bot\" [challenge]\n   :return {:challenge String}\n   :query-params [challenge]\n   (ok {:challenge challenge}))\n   \n; swagger api editor: localhost:8080/api-editor\n```\n\nHow to run?\n\n`lein run`\n\nAfter this check in the browser: \n\n`localhost:8080`\n\nHow to compile with uberjar in this case?\n\n`lein with-profile uber uberjar`\n\nHow to start server?\n\n`java -jar target/swagger-httpkit-test-uberjar.jar`\n\n\n\nOf course, you can improve this. That is just a quick tutorial.\nHave a nice day,\n\nSzabolcs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamesek%2Fswagger-http-kit-compojure-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamesek%2Fswagger-http-kit-compojure-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamesek%2Fswagger-http-kit-compojure-api/lists"}