0.10.0

(feat): 现在您可以通过在生成器配置中添加 composerJson 属性来修改生成的 composer.json 文件。 以下是带有 composerJson 属性的 generators.yml 文件示例:

generators.yml ... groups:
1 php-sdk:
2 generators:
3 - name: fernapi/fern-php-sdk
4 ...
5 config:
6 composerJson:
7 description: This is my PHP library
8 keywords:
9 - myCustomTag
10 license:
11 - "LGPL-2.1-only"
12 - "GPL-3.0-or-later"
13 scripts:
14 hello: echo hello

这将产生以下 composer.json 文件:

composer.json {
1 // ...,
2 "description": "This is my PHP library",
3 "keywords": [
4 "myCustomTag",
5 // ...,
6 ],
7 "license": [
8 "LGPL-2.1-only",
9 "GPL-3.0-or-later"
10 ],
11 // ...,
12 "scripts": {
13 // ...,
14 "hello": "echo hello"
15 }
16} ```
17
18## 0.9.0
19**`(feat):`** 添加从每个类访问 alpha 或未记录响应属性的能力。用户可以这样访问附加属性:
20```php $response = $client->users->get(...); $additionalProperties = $response->getAdditionalProperties(); ```
21
22## 0.8.0
23**`(feat):`** 为返回分页响应的端点添加自动分页支持。
24以下是用户如何使用分页端点的示例:
25```php $items = $client->list($request); foreach($items as $item){
26 echo $item;
27} $pages = $items->getPages(); foreach($pages as $page){
28 foreach($page as $item){
29 echo $item;
30 }
31} ```