{"id":25042687,"url":"https://github.com/juntaki/springfennec","last_synced_at":"2025-04-14T01:22:18.338Z","repository":{"id":57725722,"uuid":"102938048","full_name":"juntaki/springfennec","owner":"juntaki","description":"Swagger spec generator from Spring annotations, written in Kotlin","archived":false,"fork":false,"pushed_at":"2017-09-28T02:00:25.000Z","size":211,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T15:21:24.654Z","etag":null,"topics":["kotlin","spring-boot","swagger","swagger-codegen"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/juntaki.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}},"created_at":"2017-09-09T08:07:54.000Z","updated_at":"2018-12-28T13:13:34.000Z","dependencies_parsed_at":"2022-09-02T03:41:11.256Z","dependency_job_id":null,"html_url":"https://github.com/juntaki/springfennec","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/juntaki%2Fspringfennec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Fspringfennec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Fspringfennec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Fspringfennec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juntaki","download_url":"https://codeload.github.com/juntaki/springfennec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248805444,"owners_count":21164332,"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":["kotlin","spring-boot","swagger","swagger-codegen"],"created_at":"2025-02-06T04:46:53.605Z","updated_at":"2025-04-14T01:22:18.309Z","avatar_url":"https://github.com/juntaki.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Springfennec\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.juntaki/springfennec/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.juntaki/springfennec)\n\n[Swagger (OpenAPI 2.0)](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) spec.json generator for the API client generation by [swagger-codegen](https://github.com/swagger-api/swagger-codegen).\n\n## Features \n\nmainly compared with [Springfox](http://springfox.github.io/springfox/).\n\n* Predictable OperationId. build will fail if it isn't unique.\n* No duplicate of model name\n* Output spec.json as a file at build, server start isn't required.\n* Spring annotation than Swagger annotation, focus on the actual behaviour.\n\nYou cannot do the following only with springfennec. Use [swagger-ui](https://github.com/swagger-api/swagger-ui).\n\n* Hosting swagger-ui in App\n\nAlthough Springfennec supports basic (as I think) Spring functionality, but it still cannot cover all of it.\nPlease make a request by Pull request or Issue.\n\n## How to work\n\n### OperationId\n\nIf nickname in @ApiOperation annotation is defined, it will be OperationId. If not, function name will be used.\n\nIn order to generate a predictable OperationId, programmer have the responsibility to maintain its uniqueness. Therefore, suffix are not added by springfennec. If it isn't unique in the API group, the build will just fail.\n\n### Model name\n\nModel name is Java FQCN, so it's always unique.\n\n## How to use\n\n### Get started\n\nPlease refer to [springfennec-demo](https://github.com/juntaki/springfennec-demo) Project.\n\nUse apt or kapt to work Springfennec at build.\nAdd the following line to build.Gradle's dependencies.\nIf you are working with Java only project, add Kotlin dependency also.\n\n~~~\ndependencies {\n\t...\n\t// Springfennec\n\tdef springfennecVersion = 'x.x.x'\n\tcompile('io.swagger:swagger-core:1.5.16')\n\tcompile(\"com.juntaki:springfennec:${springfennecVersion}\")\n\tkapt(\"com.juntaki:springfennec:${springfennecVersion}\")\n\t...\n}\n~~~\n\n### Springfennec annotation\n\nYou can define multiple API groups in an App, by @ApiGroup/@ApiGroups annotations. (like Docket)\nOperationId must be unique for each API group.\n\nFor @SwaggerDefinition annotation, refer to [Swagger-Core Annotations documentation](https://github.com/swagger-api/swagger-core/wiki/Annotations-1.5.X#swaggerdefinition)\n\n~~~\n@ApiGroup(value=\"^/pet/.*\",        // regex for path (not include basePath)\n          name = \"pet_api\",        // output will be spec_${name}.json, e.g. spec_pet_api.json\n          apiInfo = @SwaggerDefinition(...))\n~~~\n\ne.g. ApiGroups example\n\n~~~\n@ApiGroups(\n        arrayOf(\n                ApiGroup(arrayOf(\"^/demo/user.*\"),\n                        name = \"user\",\n                        apiInfo = SwaggerDefinition(\n                                info = Info(\n                                        version = \"1.0\",\n                                        title = \"User API\"\n                                )\n                        )\n                ),\n                ApiGroup(arrayOf(\"^/demo/admin.*\"),\n                        name = \"admin\",\n                        apiInfo = SwaggerDefinition(\n                                info = Info(\n                                        version = \"1.0\",\n                                        title = \"Admin API\"\n                                )\n                        )\n                )\n        )\n)\n~~~\n\n\n### Swagger annotation\n\nThe following swagger annotation is used for spec.json generation.\nParameters determined by Spring may be ignored, even if the annotation defines it.\n\n~~~\n@ApiOperation\n@ApiParam\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntaki%2Fspringfennec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuntaki%2Fspringfennec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntaki%2Fspringfennec/lists"}