Skip to content

Commit bf01a04

Browse files
committed
docs: Update README to include AI-powered features and configuration details
1 parent c3f15a6 commit bf01a04

File tree

4 files changed

+156
-0
lines changed

4 files changed

+156
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,34 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
check-skip:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
should-skip: ${{ steps.check-labels.outputs.should-skip }}
15+
steps:
16+
- id: check-labels
17+
if: github.event_name == 'pull_request'
18+
uses: actions/github-script@v6
19+
with:
20+
script: |
21+
const labels = await github.rest.issues.listLabelsOnIssue({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: context.issue.number
25+
});
26+
27+
const docLabel = labels.data.find(label => label.name === 'type: doc');
28+
if (docLabel) {
29+
console.log('PR has type: doc label, skipping CI');
30+
return core.setOutput('should-skip', 'true');
31+
}
32+
33+
console.log('PR does not have type: doc label, continuing with CI');
34+
return core.setOutput('should-skip', 'false');
35+
1136
build-test:
37+
needs: check-skip
38+
if: ${{ github.event_name != 'pull_request' || needs.check-skip.outputs.should-skip != 'true' }}
1239
name: "Unit Test On ${{ matrix.os }} - jdk${{ matrix.java-version }}"
1340
runs-on: ${{ matrix.os }}
1441
continue-on-error: true

.github/workflows/co.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,34 @@ on:
77
branches: [ master ]
88

99
jobs:
10+
check-skip:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
should-skip: ${{ steps.check-labels.outputs.should-skip }}
14+
steps:
15+
- id: check-labels
16+
if: github.event_name == 'pull_request'
17+
uses: actions/github-script@v6
18+
with:
19+
script: |
20+
const labels = await github.rest.issues.listLabelsOnIssue({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
issue_number: context.issue.number
24+
});
25+
26+
const docLabel = labels.data.find(label => label.name === 'type: doc');
27+
if (docLabel) {
28+
console.log('PR has type: doc label, skipping CO');
29+
return core.setOutput('should-skip', 'true');
30+
}
31+
32+
console.log('PR does not have type: doc label, continuing with CO');
33+
return core.setOutput('should-skip', 'false');
34+
1035
coverage:
36+
needs: check-skip
37+
if: ${{ github.event_name != 'pull_request' || needs.check-skip.outputs.should-skip != 'true' }}
1138
name: "Generate coverage On ${{ matrix.os }} - jdk${{ matrix.java-version }}"
1239
runs-on: ${{ matrix.os }}
1340
strategy:

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/tangcent/easy-yapi.svg)](http://isitmaintained.com/project/tangcent/easy-yapi "Average time to resolve an issue")
88
[![Percentage of issues still open](http://isitmaintained.com/badge/open/tangcent/easy-yapi.svg)](http://isitmaintained.com/project/tangcent/easy-yapi "Percentage of issues still open")
99

10+
English | [中文](README_CN.md)
11+
1012
## Feature
1113

1214
- [Export API Documents](https://easyyapi.com/documents/use.html)
@@ -19,6 +21,22 @@
1921
| channels | [Postman](https://easyyapi.com/documents/export2postman.html), [Yapi](https://easyyapi.com/documents/export2yapi.html), [Markdown](https://easyyapi.com/documents/export2markdown.html) , [Curl](https://curl.se/) , [HttpClient](https://plugins.jetbrains.com/plugin/13121-http-client) | - |
2022
| frameworks | javax.validation, Jackson, Gson | [swagger](https://swagger.io/) |
2123

24+
## AI Powered (Beta)
25+
26+
EasyYAPI includes powerful AI capabilities to enhance your API documentation workflow:
27+
28+
### Features
29+
30+
- **API Translation**: Automatically translate your API documentation to different languages, preserving technical terms while providing natural language translations.
31+
- **Method Return Type Inference**: Use AI to analyze method code and more accurately infer complex return types, improving API documentation accuracy.
32+
33+
### Configuration
34+
35+
- **Support for Multiple AI Providers**: Configure your preferred AI provider (OpenAI, DeepSeek, etc.) and models (GPT-4, DeepSeek-V3, etc.).
36+
- **API Response Caching**: Optimize performance by caching AI responses for identical requests.
37+
38+
To enable these features, configure your AI provider and API token in the EasyYAPI settings dialog.
39+
2240
## Navigation
2341

2442
* [Guide](https://easyyapi.com/documents/index.html)

README_CN.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# easy-yapi
2+
3+
[![CI](https://github.com/tangcent/easy-yapi/actions/workflows/ci.yml/badge.svg)](https://github.com/tangcent/easy-yapi/actions/workflows/ci.yml)
4+
[![codecov](https://codecov.io/gh/tangcent/easy-yapi/branch/master/graph/badge.svg?token=J6RUGI54XV)](https://codecov.io/gh/tangcent/easy-yapi)
5+
[![](https://img.shields.io/jetbrains/plugin/v/12458?color=blue&label=version)](https://plugins.jetbrains.com/plugin/12458-easyyapi)
6+
[![](https://img.shields.io/jetbrains/plugin/d/12458)](https://plugins.jetbrains.com/plugin/12458-easyyapi)
7+
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/tangcent/easy-yapi.svg)](http://isitmaintained.com/project/tangcent/easy-yapi "Average time to resolve an issue")
8+
[![Percentage of issues still open](http://isitmaintained.com/badge/open/tangcent/easy-yapi.svg)](http://isitmaintained.com/project/tangcent/easy-yapi "Percentage of issues still open")
9+
10+
[English](README.md) | 中文
11+
12+
## 功能特点
13+
14+
- [导出API文档](https://easyyapi.com/documents/use.html)
15+
- [发送API请求](http://easyyapi.com/documents/call.html)
16+
17+
| | 支持 | 扩展支持 |
18+
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|
19+
| 语言 | java, kotlin | scala |
20+
| Web框架 | [spring](https://spring.io/), [feign](https://spring.io/projects/spring-cloud-openfeign), [jaxrs](https://www.oracle.com/technical-resources/articles/java/jax-rs.html) ([quarkus](https://quarkus.io/)[jersey](https://eclipse-ee4j.github.io/jersey/)) | [dubbo](https://dubbo.apache.org) |
21+
| 导出渠道 | [Postman](https://easyyapi.com/documents/export2postman.html), [Yapi](https://easyyapi.com/documents/export2yapi.html), [Markdown](https://easyyapi.com/documents/export2markdown.html) , [Curl](https://curl.se/) , [HttpClient](https://plugins.jetbrains.com/plugin/13121-http-client) | - |
22+
| 支持的框架 | javax.validation, Jackson, Gson | [swagger](https://swagger.io/) |
23+
24+
## AI增强 (Beta)
25+
26+
EasyYAPI可以通过接入AI生成更好API文档:
27+
28+
### 特性
29+
30+
- **API翻译**:导出API文档时, 自动将API文档翻译成指定语言。
31+
- **方法返回类型推断**:使用AI分析方法代码并更准确地推断复杂返回类型,提高 API 文档的准确性。
32+
33+
### 配置
34+
35+
- **支持多种AI提供商**:可以配置AI提供商(OpenAI, DeepSeek 等)和模型(GPT-4, DeepSeek-V3 等)。
36+
- **API响应缓存**:通过缓存相同请求的AI响应来优化性能。
37+
38+
要启用这些功能,请在IDEA中配置AI提供商。
39+
40+
## 导航
41+
42+
* [指南](https://easyyapi.com/documents/index.html)
43+
* [安装](https://easyyapi.com/documents/installation.html)
44+
* [使用](https://easyyapi.com/documents/use.html)
45+
* [设置](https://easyyapi.com/setting/index.html)
46+
* [示例](https://easyyapi.com/demo/index.html)
47+
48+
## 运行应用
49+
50+
- `./gradlew :idea-plugin:runIde` 将运行一个安装了 EasyYapi 的 IDEA 实例。
51+
- `./gradlew clean test` 将运行所有测试用例。
52+
53+
## 环境要求
54+
55+
- IDE: Intellij Idea Ultimate / Intellij Idea Community 2021.2.1 或更高版本
56+
- JDK: 11 或更高版本
57+
58+
## 兼容性
59+
60+
| JDK | IDE | 状态 |
61+
|-----|----------|------|
62+
| 11 | 2021.2.1 ||
63+
| 15 | 2022.2.3 ||
64+
| 17 | 2023.1.3 ||
65+
66+
## Javadoc
67+
68+
- [wiki](https://en.wikipedia.org/wiki/Javadoc)
69+
- [oracle](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html)
70+
- [百科](https://baike.baidu.com/item/javadoc)
71+
72+
## KDoc
73+
74+
- [kotlin-doc](https://kotlinlang.org/docs/reference/kotlin-doc.html)
75+
76+
## 贡献
77+
78+
您可以通过提出 issue 或提交 pull request 来提出功能请求。
79+
80+
以下是贡献者列表:
81+
82+
<a href="https://github.com/tangcent/easy-yapi/graphs/contributors">
83+
<img src="https://contrib.rocks/image?repo=tangcent/easy-yapi" />
84+
</a>

0 commit comments

Comments
 (0)