{"id":23663971,"url":"https://github.com/belier-cn/swagger-customer-api","last_synced_at":"2026-05-05T22:42:09.297Z","repository":{"id":42551894,"uuid":"184244525","full_name":"belier-cn/swagger-customer-api","owner":"belier-cn","description":"添加swagger额外的接口文档","archived":false,"fork":false,"pushed_at":"2022-12-15T23:25:12.000Z","size":13,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-29T05:37:15.429Z","etag":null,"topics":["spring","spring-mvc","swagger"],"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/belier-cn.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":"2019-04-30T10:44:33.000Z","updated_at":"2019-05-05T02:33:06.000Z","dependencies_parsed_at":"2023-01-29T04:45:34.846Z","dependency_job_id":null,"html_url":"https://github.com/belier-cn/swagger-customer-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belier-cn%2Fswagger-customer-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belier-cn%2Fswagger-customer-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belier-cn%2Fswagger-customer-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belier-cn%2Fswagger-customer-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belier-cn","download_url":"https://codeload.github.com/belier-cn/swagger-customer-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239662724,"owners_count":19676435,"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":["spring","spring-mvc","swagger"],"created_at":"2024-12-29T05:37:31.448Z","updated_at":"2025-12-06T15:30:14.025Z","avatar_url":"https://github.com/belier-cn.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 添加swagger额外的接口文档\n[![Maven Central](https://img.shields.io/maven-central/v/cn.belier/swagger-customer-api.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22cn.belier%22%20AND%20a:%22swagger-customer-api%22)\n\n### 如何使用\n\n#### 引入依赖\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecn.belier\u003c/groupId\u003e\n  \u003cartifactId\u003eswagger-customer-api\u003c/artifactId\u003e\n  \u003cversion\u003e最新版本，参见上面的图标\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\n#### 编写接口文档\n\n用 CustomerApi 标记，不使用 RestController\n\n```java\n\n@Api(tags = \"测试接口\")\n@CustomerApi\n@RequestMapping(\"test\")\npublic class TestApi {\n\n    @ApiOperation(\"测试\")\n    @GetMapping(\"test\")\n    public String test(@RequestParam @ApiParam(\"测试参数\") String test) {\n        return test;\n    }\n\n}\n\n```\n\n#### 开启扫描注解\n\n可以指定包名，不指定默认为标记的类的包\n\n```java\n@SwaggerCustomerApiScanner\n@SpringBootApplication\npublic class Application {\n\n    public static void main(String[] args) {\n        SpringApplication.run(Application.class, args);\n    }\n\n}\n\n```\n\nTestApi 的接口不会在 Spring MVC 中生效，但是会在文档中显示","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelier-cn%2Fswagger-customer-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelier-cn%2Fswagger-customer-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelier-cn%2Fswagger-customer-api/lists"}