Compare commits

...

7 Commits

Author SHA1 Message Date
JasonLandbridge
83a16b6fd8 fix: update build-referenced script to include config option for redocly 2025-06-09 08:53:20 +02:00
JasonLandbridge
49e4c18e79 chore: update devDependencies for vite-plugin-yaml and redocly/cli 2025-06-09 08:53:20 +02:00
Jason Landbridge
575c5b21b9 Update .github/workflows/build-and-push-pms-spec.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-09 08:53:20 +02:00
JasonLandbridge
bf28b05bf1 fixed name 2025-06-09 08:53:20 +02:00
JasonLandbridge
eeb506bd92 fixed name 2025-06-09 08:53:20 +02:00
JasonLandbridge
ddbaf9b8ec Merged the SDK generation into the build step 2025-06-09 08:53:20 +02:00
JasonLandbridge
68852ba86f Have build step include the redocly referenced file 2025-06-09 08:53:20 +02:00
5 changed files with 60 additions and 67 deletions

View File

@@ -1,32 +0,0 @@
name: Build and Copy Dereferenced Plex Media Server API Spec
on:
push:
branches:
- main
paths:
- src/**
workflow_dispatch:
jobs:
dereference_api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Project Setup
uses: ./.github/workflows/steps/project-setup
- name: Dereference Plex Media Server Specification
run: bun run build
- name: Commit Dereferenced Specification File
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "build: dereferenced Plex Media Server API Spec updated"
skip_checkout: true
skip_fetch: true
add_options: "-f"
file_pattern: "./output/*.yaml"
skip_dirty_check: true

View File

@@ -0,0 +1,55 @@
name: Build and Push Plex Media Server API Spec
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
on:
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
push:
branches:
- main
paths:
- .github/workflows/build-and-push-pms-spec.yaml
- src/**
jobs:
build:
name: Build Open API Spec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Project Setup
uses: ./.github/workflows/steps/project-setup
- name: Build Plex Media Server Specification
run: bun run build
- name: Commit Build Specification Files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "build: dereferenced Plex Media Server API Spec updated"
skip_checkout: true
skip_fetch: true
add_options: "-f"
file_pattern: "./output/*.yaml"
skip_dirty_check: true
generate:
needs: build
name: Push to Speakeasy API
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

View File

@@ -1,31 +0,0 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 * * * *
push:
branches:
- main
paths:
- .github/workflows/sdk_generation.yaml
- output/plex-media-server-spec-dereferenced.yaml
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

BIN
bun.lockb

Binary file not shown.

View File

@@ -17,9 +17,10 @@
"dev": "redocly preview -d=./src",
"preview-docs": "redocly preview-docs src/pms-spec.yaml --config=./redocly.yaml",
"stats": "redocly stats ./src/pms-spec.yaml",
"build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"build": "bun run build-referenced & bun run build-dereferenced & wait",
"build-referenced": "redocly bundle ./src/pms-spec.yaml --config ./redocly.yaml --ext yaml -o ./output/plex-media-server-spec-referenced.yaml",
"build-dereferenced": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"build-watch": "bun run build && chokidar './src/**/*' -c 'bun run build'",
"build-redocly": "redocly bundle ./src/pms-spec.yaml --ext yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"test": "bun run build && vitest --run",
"type-check": "tsc",
"setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh",
@@ -29,9 +30,9 @@
"lint-bundled": "speakeasy lint openapi -s ./output/plex-media-server-spec-dereferenced.yaml"
},
"devDependencies": {
"@modyfi/vite-plugin-yaml": "^1.1.0",
"@modyfi/vite-plugin-yaml": "^1.1.1",
"@ngneat/falso": "^7.3.0",
"@redocly/cli": "^1.28.1",
"@redocly/cli": "^1.34.3",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.5.0",
"chokidar-cli": "^3.0.0",