Skip to content

Commit 4a795f9

Browse files
jsklanfern-support
andauthored
Upgrade fern and apply migrations (#341)
* Upgrade fern cli version with defaults migration * interim * update unstable overrides * revert overrides changes * remove coerce optional to nullable for unstable api * remove endpoints from unstable api that have ben promoted to main api * renable correct type coersion by ignoring version header * nits * revert overrides removals * Upgrade fern cli and generator versions * nit * nit * disable java wire tests * upgrade * update workflow dir path * Update overrides * Update preview command for ts sdk to use pnpm * Update preview ci to include python and php previews * Fix typo * Nit in ts sdk preview --------- Co-authored-by: fern-support <[email protected]>
1 parent cf080e4 commit 4a795f9

File tree

7 files changed

+365
-14
lines changed

7 files changed

+365
-14
lines changed

.github/workflows/preview_sdks.yml

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/checkout@v4
1414

1515
- name: Setup node
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v6
1717

1818
- name: Download Fern
1919
run: npm install -g fern-api
@@ -24,14 +24,19 @@ jobs:
2424
run: |
2525
fern generate --group ts-sdk --preview --log-level debug
2626
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
package_json_file: fern/.preview/fern-typescript-sdk/package.json
31+
2732
- name: Compile
2833
env:
2934
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
3035
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3136
run: |
32-
cd fern/.preview/fern-typescript-node-sdk
33-
yarn install
34-
yarn build
37+
cd fern/.preview/fern-typescript-sdk
38+
pnpm install --frozen-lockfile
39+
pnpm build
3540
3641
preview-java:
3742
runs-on: ubuntu-latest
@@ -60,3 +65,65 @@ jobs:
6065
run: |
6166
cd fern/.preview/fern-java-sdk
6267
./gradlew assemble
68+
69+
preview-python:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout repo
73+
uses: actions/checkout@v4
74+
75+
- name: Set up python
76+
uses: actions/setup-python@v4
77+
with:
78+
python-version: 3.9
79+
80+
- name: Bootstrap poetry
81+
run: |
82+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
83+
84+
- name: Download Fern
85+
run: npm install -g fern-api
86+
87+
- name: Generate Preview
88+
env:
89+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
90+
run: |
91+
fern generate --group python-sdk --preview --log-level debug
92+
93+
- name: Build
94+
env:
95+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
96+
run: |
97+
cd fern/.preview/fern-python-sdk
98+
poetry install
99+
poetry run mypy .
100+
101+
preview-php:
102+
runs-on: ubuntu-latest
103+
104+
steps:
105+
- name: Checkout repo
106+
uses: actions/checkout@v4
107+
108+
- name: Setup PHP
109+
uses: shivammathur/setup-php@v2
110+
with:
111+
php-version: "8.1"
112+
113+
- name: Download Fern
114+
run: npm install -g fern-api
115+
116+
- name: Generate Preview
117+
env:
118+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
119+
run: |
120+
fern generate --group php-sdk --preview --log-level debug
121+
122+
- name: Build
123+
env:
124+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
125+
run: |
126+
cd fern/.preview/fern-php-sdk
127+
composer install
128+
composer build
129+
composer analyze

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ compiled/
1717

1818
# Fern preview files
1919
/fern/.preview
20+
/fern/.definition

descriptions/2.14/api.intercom.io.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,7 +3400,7 @@ paths:
34003400
required: true
34013401
description: The unique identifier for the contact which is given by Intercom
34023402
schema:
3403-
type: integer
3403+
type: string
34043404
tags:
34053405
- Companies
34063406
- Contacts
@@ -18687,7 +18687,7 @@ components:
1868718687
description: The data export api is used to view all message sent & viewed in
1868818688
a given timeframe.
1868918689
properties:
18690-
job_identfier:
18690+
job_identifier:
1869118691
type: string
1869218692
description: The identifier for your job.
1869318693
example: orzzsbd7hk67xyu

fern/fern.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization": "intercom",
3-
"version": "0.70.1"
4-
}
3+
"version": "3.0.2"
4+
}

fern/generators.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,33 @@ api:
66
settings:
77
title-as-schema-name: false
88
inline-path-parameters: true
9+
type-dates-as-strings: true
10+
object-query-parameters: false
11+
idiomatic-request-names: false
12+
respect-nullable-schemas: false
13+
wrap-references-to-nullable-in-optional: true
14+
coerce-optional-schemas-to-nullable: true
15+
coerce-enums-to-literals: true
916
- openapi: ../descriptions/0/api.intercom.io.yaml
1017
overrides: ./unstable-openapi-overrides.yml
1118
namespace: unstable
1219
settings:
1320
title-as-schema-name: false
1421
inline-path-parameters: true
22+
type-dates-as-strings: true
23+
object-query-parameters: false
24+
idiomatic-request-names: false
25+
respect-nullable-schemas: false
26+
wrap-references-to-nullable-in-optional: true
27+
coerce-optional-schemas-to-nullable: true
28+
coerce-enums-to-literals: true
29+
settings:
30+
path-parameter-order: spec-order
1531
groups:
1632
ts-sdk:
1733
generators:
18-
- name: fernapi/fern-typescript-node-sdk
19-
version: 0.51.7
34+
- name: fernapi/fern-typescript-sdk
35+
version: 3.35.8
2036
output:
2137
location: npm
2238
package-name: intercom-client
@@ -46,7 +62,7 @@ groups:
4662
java-sdk:
4763
generators:
4864
- name: fernapi/fern-java-sdk
49-
version: 2.37.0
65+
version: 3.21.0
5066
output:
5167
location: maven
5268
coordinate: io.intercom:intercom-java
@@ -64,11 +80,13 @@ groups:
6480
client-class-name: Intercom
6581
inline-path-parameters: true
6682
enable-forward-compatible-enums: true
83+
enable-wire-tests: false
84+
smart-casing: false
6785

6886
python-sdk:
6987
generators:
7088
- name: fernapi/fern-python-sdk
71-
version: 4.22.0
89+
version: 4.41.8
7290
github:
7391
mode: pull-request
7492
repository: intercom/python-intercom
@@ -80,11 +98,12 @@ groups:
8098
location: pypi
8199
package-name: 'python-intercom'
82100
token: ${FERN_PYPI_TOKEN}
101+
smart-casing: false
83102

84103
php-sdk:
85104
generators:
86105
- name: fernapi/fern-php-sdk
87-
version: 1.16.7
106+
version: 1.25.0
88107
github:
89108
mode: pull-request
90109
repository: intercom/intercom-php

0 commit comments

Comments
 (0)