From e823b42f8b14cf98f90206ee284d9711a0931640 Mon Sep 17 00:00:00 2001 From: patrickthornton Date: Fri, 14 Mar 2025 11:03:18 -0400 Subject: [PATCH 1/5] decrease error count for java-sdk tests now compile; # of failed tests 30 -> 10, by including correct offset paging when relevant and modifying some tests to match the current spec (see PR in fern-demo) --- fern/fern.config.json | 4 ++-- fern/openapi-overrides.yml | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/fern/fern.config.json b/fern/fern.config.json index 4d009ef..1b60f11 100644 --- a/fern/fern.config.json +++ b/fern/fern.config.json @@ -1,4 +1,4 @@ { "organization": "intercom", - "version": "0.53.17" -} + "version": "0.56.19" +} \ No newline at end of file diff --git a/fern/openapi-overrides.yml b/fern/openapi-overrides.yml index 3d0bc78..424efdb 100644 --- a/fern/openapi-overrides.yml +++ b/fern/openapi-overrides.yml @@ -1465,6 +1465,51 @@ components: custom_attributes: additionalProperties: true + # adding offset pages + offset_pages: + title: Offset based pages + type: object + properties: + type: + type: string + description: the type of object `offset_pages` + example: offset_pages + enum: + - offset_pages + page: + type: integer + description: The current offset + example: 1 + next: + type: string + nullable: true + per_page: + type: integer + description: Number of results per page + example: 2 + total_pages: + type: integer + description: Total number of pages + example: 13 + required: + - type + collection_list: + properties: + pages: + "$ref": "#/components/schemas/offset_pages" + article_list: + properties: + pages: + "$ref": "#components/schemas/offset_pages" + company_list: + properties: + pages: + "$ref": "#/components/schemas/offset_pages" + note_list: + properties: + pages: + "$ref": "#/components/schemas/offset_pages" + securitySchemes: bearerAuth: x-fern-bearer: From ddc6e84d8186f23a0d5a94f2fcff4210c2bf85ad Mon Sep 17 00:00:00 2001 From: patrickthornton Date: Fri, 14 Mar 2025 11:41:13 -0400 Subject: [PATCH 2/5] zero out error count for java-sdk fixes typing of contact.avatar. when run with modified tests from fern-demo/intercom-java-sdk (currently branch gettin-tests-to-work), compiles and passes all tests --- fern/openapi-overrides.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fern/openapi-overrides.yml b/fern/openapi-overrides.yml index 424efdb..3363cfe 100644 --- a/fern/openapi-overrides.yml +++ b/fern/openapi-overrides.yml @@ -1383,10 +1383,11 @@ components: enum: - contact avatar: - properties: - type: - enum: - - avatar + properties: null + type: string + format: uri + description: An image URL containing the avatar of a contact. + example: https://example.org/128Wash.jpg create_article_request: properties: parent_type: From 9831888dc471b434560345d885880c8cfb958cbd Mon Sep 17 00:00:00 2001 From: patrickthornton Date: Fri, 14 Mar 2025 12:40:13 -0400 Subject: [PATCH 3/5] preview-java gh workflow --- .github/workflows/preview_sdks.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/preview_sdks.yml b/.github/workflows/preview_sdks.yml index 51ef494..dbfe8a2 100644 --- a/.github/workflows/preview_sdks.yml +++ b/.github/workflows/preview_sdks.yml @@ -32,3 +32,31 @@ jobs: cd fern/.preview/fern-typescript-node-sdk yarn install yarn build + + preview-java: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: "11" + architecture: x64 + + - name: Download Fern + run: npm install -g fern-api + + - name: Generate Preview + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: | + fern generate --group java-sdk --preview --log-level debug + + - name: Build + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: | + cd fern/.preview/fern-java-sdk + ./gradlew build From fa51b72bc32a879d68be1ceba02128a468aed733 Mon Sep 17 00:00:00 2001 From: patrickthornton Date: Fri, 14 Mar 2025 12:43:33 -0400 Subject: [PATCH 4/5] add generator --- fern/generators.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/fern/generators.yml b/fern/generators.yml index d13153b..7ebdd73 100644 --- a/fern/generators.yml +++ b/fern/generators.yml @@ -35,3 +35,21 @@ groups: - intercom - api smart-casing: true + + java-sdk: + generators: + - name: fernapi/fern-java-sdk + version: 2.25.0 + # output: + # location: maven + # coordinate: com.square:square-java + # username: ${MAVEN_USERNAME} + # password: ${MAVEN_PASSWORD} + github: + repository: fern-demo/intercom-java-sdk + branch: gettin-tests-to-work + mode: push + config: + enable-inline-types: true + client-class-name: Intercom + inline-path-parameters: true From 5d218c2cae61fc1da0fa5304a881058ab5c46271 Mon Sep 17 00:00:00 2001 From: patrickthornton Date: Fri, 14 Mar 2025 13:13:46 -0400 Subject: [PATCH 5/5] simplify to assemble, not build avoids the workflow doing a ton of API calls --- .github/workflows/preview_sdks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview_sdks.yml b/.github/workflows/preview_sdks.yml index dbfe8a2..1c52a11 100644 --- a/.github/workflows/preview_sdks.yml +++ b/.github/workflows/preview_sdks.yml @@ -59,4 +59,4 @@ jobs: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} run: | cd fern/.preview/fern-java-sdk - ./gradlew build + ./gradlew assemble