{"id":15091400,"url":"https://github.com/anupsaund/vertx-auto-swagger","last_synced_at":"2026-04-02T03:00:13.626Z","repository":{"id":92064643,"uuid":"147231389","full_name":"anupsaund/vertx-auto-swagger","owner":"anupsaund","description":"Java Micro Service API Generation","archived":false,"fork":false,"pushed_at":"2022-02-23T05:43:48.000Z","size":2728,"stargazers_count":33,"open_issues_count":0,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T06:35:07.390Z","etag":null,"topics":["annotations","java","openapi-specification","openapi3","swagger","swagger-ui","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","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/anupsaund.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-03T16:50:50.000Z","updated_at":"2024-12-20T07:55:56.000Z","dependencies_parsed_at":"2023-03-26T13:19:12.386Z","dependency_job_id":null,"html_url":"https://github.com/anupsaund/vertx-auto-swagger","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"8c096e17b6823da8595ab81f3f0e5f9bba593600"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anupsaund/vertx-auto-swagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anupsaund%2Fvertx-auto-swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anupsaund%2Fvertx-auto-swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anupsaund%2Fvertx-auto-swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anupsaund%2Fvertx-auto-swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anupsaund","download_url":"https://codeload.github.com/anupsaund/vertx-auto-swagger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anupsaund%2Fvertx-auto-swagger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"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":["annotations","java","openapi-specification","openapi3","swagger","swagger-ui","vertx"],"created_at":"2024-09-25T10:40:57.677Z","updated_at":"2026-04-02T03:00:13.613Z","avatar_url":"https://github.com/anupsaund.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vertx-auto-swagger\n\n\u003e TL;DR - How to get java Vert.x to automatically generate a Open API v3 spec (A.k.a. Swagger) and serve it to Swagger UI, served through Vert.x.\n\n### Motivation\nI needed a way to generate a swagger spec from Java code, instead of having to hand craft a swagger JSON file.\n\nI also wanted to serve out the spec from Vert.x into Swagger UI so that it could be used by all.\n\nThere is a more detailed write up available on my blog post: \nhttp://anupsaund.com/how-to-generate-openapi-3-0-swagger-spec-from-vertx-java-and-serve-it-via-swagger-ui\n\n### What does it do?\n\n1.  Read Java Annotations and map them into a openAPI spec.\n2.  Serve the openAPI spec out on an end point.\n3.  Serve a distributable version of SwaggerUI which presents the swagger spec from point 2.\n\n\n### Screenshot of Swagger UI\n![SwaggerUI](UI.PNG \"SwaggerUI\")\n\n### What does a typical Java annotation look like?\n\n```java\n@Operation(summary = \"Find products by ID\", method = \"GET\", operationId = \"product/:productId\",\n    tags = {\n      \"Product\"\n    },\n    parameters = {\n      @Parameter(in = ParameterIn.PATH, name = \"productId\",\n        required = true, description = \"The unique ID belonging to the product\", schema = @Schema(type = \"string\"))\n    },\n    responses = {\n      @ApiResponse(responseCode = \"200\", description = \"OK\",\n        content = @Content(\n          mediaType = \"application/json\",\n          encoding = @Encoding(contentType = \"application/json\"),\n          schema = @Schema(name = \"product\", example =\n            \"{\" +\n              \"'_id':'abc',\" +\n              \"'title':'Red Truck',\" +\n              \"'image_url':'https://images.pexels.com/photos/1112597/pexels-photo-1112597.jpeg',\" +\n              \"'from_date':'2018-08-30',\" +\n              \"'to_date':'2019-08-30',\" +\n              \"'price':'125.00',\" +\n              \"'enabled':true\" +\n              \"}\",\n            implementation = Product.class)\n        )\n      ),\n      @ApiResponse(responseCode = \"404\", description = \"Not found.\"),\n      @ApiResponse(responseCode = \"500\", description = \"Internal Server Error.\")\n    }\n  )\n```\n\n## How to get it running\n\n\u003e Dependancies: Maven, JAVA and a JAVA IDE is helpful.\n\n1. Clone the repository and use Maven to install dependancies.\n1. In Intellij set up a config to run a Java Application with the following settings.\n\n``` \n  Main Class: io.vertx.core.Launcher\n  VM Options: \u003cup to you, or leave blank\u003e\n  Program Arguments: run io.vertx.VertxAutoSwagger.MainVerticle\n```\n\n3. After tha application has launched, go to http://localhost:8080/doc/index.html\n\n#### Special Credit\nGoes to Christos Karatzas for creating the generator class which has been used and enhanced for this respository:\n \nHis original repository is available at: https://github.com/ckaratzas/vertx-openapi-spec-generator\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanupsaund%2Fvertx-auto-swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanupsaund%2Fvertx-auto-swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanupsaund%2Fvertx-auto-swagger/lists"}