# xiaoymin/knife4j

Knife4j is a set of Swagger2 and OpenAPI3 All-in-one enhancement solution

Repository: https://github.com/xiaoymin/knife4j
Canonical: https://ross.abutalabs.com/products/knife4j
Homepage: https://doc.xiaominfo.com
Language: HTML
License: Apache-2.0
License Family: permissive
Topics: swagger, swagger-ui, springfox-swagger2, knife4j, openapi2, springdoc-openapi, openapi3
Last push: 2026-02-03T03:59:34+00:00

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 65, release rhythm 8, longevity 100
- inputs: {"age_days": 3423, "days_push": 211, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4577, forks 681 (observed 2026-08-28T04:08:53.693288+00:00)

## What it is
Knife4j is an all-in-one enhancement solution for Swagger2 (OpenAPI2) and OpenAPI3 in the Java/Spring ecosystem, providing an improved API documentation UI plus Spring Boot starters built on springfox and springdoc-openapi. It also ships middleware for aggregating OpenAPI documents across microservices, including a gateway component and a standalone Docker-deployable viewer (Knife4jInsight).

## Use cases
- generate swagger api docs for spring boot
- better swagger ui alternative for java
- aggregate openapi docs across microservices
- view openapi3 spec in a nicer ui
- integrate api documentation with spring cloud gateway
- export and customize api documentation with i18n and sorting

## When to choose
- you have a Java Spring Boot or Spring MVC project needing Swagger2/OpenAPI3 docs
- you want an enhanced UI with debugging, sorting, i18n, and export beyond default swagger-ui
- you need to aggregate OpenAPI documents from multiple microservices or a gateway

## When to avoid
- your stack is not JVM/Spring based
- you only need a minimal spec viewer without Spring integration
- you rely on the latest springfox 3.x features, since Knife4j pins springfox 2.10.5 and pushes OpenAPI3/springdoc

## Facets
- artifact type: framework
- maturity: active
- function: api-framework, api-documentation, ui-components, middleware
- domain: apis, web-development, backend, documentation, developer-tools
- platform: jvm, self-hosted
- tags: swagger, openapi, spring-boot, springdoc, springfox, api-docs-ui, microservices-aggregation, spring, docker

## Member repositories
- xiaoymin/knife4j (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:53.693288+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:55.322263+00:00, confidence not recorded.
  - readme: https://github.com/xiaoymin/knife4j (fetched 2026-08-28T04:08:53.693288+00:00, sha 3bef5340ecf5)
  - homepage: https://doc.xiaominfo.com (fetched 2026-08-29T09:05:23.570596+00:00, sha a5eb91058ac2)
  - site_page: https://doc.xiaominfo.com/docs/quick-start (fetched 2026-08-29T09:05:23.573594+00:00, sha 814e4ddb5c68)
  - site_page: https://doc.xiaominfo.com/docs/middleware-sources (fetched 2026-08-29T09:05:23.575551+00:00, sha 923e0510d880)
  - site_page: https://doc.xiaominfo.com/docs/blog (fetched 2026-08-29T09:05:23.577131+00:00, sha e14055b4cefd)
  - site_page: https://doc.xiaominfo.com/docs/action (fetched 2026-08-29T09:05:23.578617+00:00, sha 567eb2cc488d)
  - site_page: https://doc.xiaominfo.com/docs/changelog (fetched 2026-08-29T09:05:23.580141+00:00, sha 6156acfbd6a1)
  - site_page: https://doc.xiaominfo.com/docs/faq (fetched 2026-08-29T09:05:23.581821+00:00, sha ee0fe61e6a82)
  - site_page: https://doc.xiaominfo.com/docs/community/simple-demo (fetched 2026-08-29T09:05:23.583528+00:00, sha 641e181a54f4)
  - site_page: https://doc.xiaominfo.com/docs/upgrading/upgrading-to-v4 (fetched 2026-08-29T09:05:23.585240+00:00, sha 375278c22ccf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
