Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions .github/actions/validate-sdk/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,46 @@ inputs:
runs:
using: 'composite'
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
cache: 'npm'

- name: Install dependencies
shell: bash
run: pnpm install
run: npm install

- name: Build SDK
shell: bash
run: pnpm run build
run: npm run build

# - name: Typecheck tests directory
# shell: bash
# run: npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 tests/**/*.ts

- name: Install examples dependencies
shell: bash
working-directory: examples
run: pnpm install
run: npm install

# TODO: Re-enable when Speakeasy fixes generated code type errors
- name: Typecheck examples root
shell: bash
working-directory: examples
run: pnpm exec tsc
run: npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 *.ts

- name: Install nextjs-example dependencies
shell: bash
working-directory: examples/nextjs-example
run: pnpm install
run: npm install

- name: Typecheck nextjs-example
shell: bash
working-directory: examples/nextjs-example
run: pnpm exec tsc --noEmit

- name: Run unit tests
shell: bash
env:
OPENROUTER_API_KEY: ${{ inputs.openrouter-api-key }}
run: pnpm exec vitest --run --exclude 'tests/e2e/**'
run: npx tsc --noEmit

- name: Run e2e tests
- name: Run tests
shell: bash
env:
OPENROUTER_API_KEY: ${{ inputs.openrouter-api-key }}
run: pnpm exec vitest --run tests/e2e/
run: npx vitest --run
11 changes: 0 additions & 11 deletions .github/workflows/speakeasy_run_on_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install Speakeasy CLI
run: |
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@
.env.*.local
/examples/.env
/examples/package-lock.json
/examples/nextjs-example/package-lock.json
/examples/nextjs-example/package.lock.json
/temp
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

4 changes: 2 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ management:
docVersion: 1.0.0
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.3.1
configChecksum: 2ebf79caacefe8cd3647823595fe3688
releaseVersion: 0.2.2
configChecksum: 18e3ab6a8a0d2fbb81ed748650739b3d
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down
6 changes: 3 additions & 3 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ generation:
securityFeb2025: true
sharedErrorComponentsApr2025: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
inferSSEOverload: true
sdkHooksConfigAccess: true
Expand All @@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
typescript:
version: 0.3.1
version: 0.2.2
acceptHeaderEnum: false
additionalDependencies:
dependencies: {}
Expand Down
9 changes: 9 additions & 0 deletions .speakeasy/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
lintVersion: 1.0.0
defaultRuleset: openrouter
rulesets:
openrouter:
rulesets:
- speakeasy-generation
rules:
oas3-missing-example:
severity: "off"
3 changes: 1 addition & 2 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sources:
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
tags:
- latest
- matt-fix-reasoning-and-types
- 1.0.0
targets:
openrouter:
Expand All @@ -15,7 +14,7 @@ targets:
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:7f5011aa123855cc92e9b1975ea54d834113df9dc07c7974b41ef8d49a2d4cfc
codeSamplesRevisionDigest: sha256:0ac460d1b6ebab411430eae7b520d5337bcf5298aad60af53b02e17dc67ce241
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
Expand Down
Loading