mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-06 12:37:45 +00:00
Fixed pathing
This commit is contained in:
29
.github/workflows/build-and-copy-pms-spec.yml
vendored
29
.github/workflows/build-and-copy-pms-spec.yml
vendored
@@ -5,10 +5,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "pms-spec.yaml"
|
- src/**
|
||||||
- "parameters/**"
|
|
||||||
- "responses/**"
|
|
||||||
- "paths/**"
|
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@@ -18,28 +15,30 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout PR branch
|
- name: Checkout PR branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
- name: Setup Bun
|
||||||
with:
|
uses: oven-sh/setup-bun@v2
|
||||||
node-version: "16"
|
|
||||||
- name: Install swagger-cli
|
- name: Install Dependencies
|
||||||
run: |
|
run: bun install
|
||||||
npm install -g swagger-cli
|
|
||||||
|
|
||||||
- name: Dereference Plex Media Server Specification
|
- name: Dereference Plex Media Server Specification
|
||||||
run: |
|
run: bun run build
|
||||||
swagger-cli bundle --dereference pms-spec.yaml -t yaml -o plex-media-server-spec-dereferenced.yaml
|
|
||||||
|
- name: Commit Dereferenced Specification File
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: "build: dereferenced Plex Media Server API Spec updated"
|
||||||
|
|
||||||
- name: Pushes Dereferenced Specification File
|
- name: Pushes Dereferenced Specification File
|
||||||
uses: dmnemec/copy_file_to_another_repo_action@main
|
uses: dmnemec/copy_file_to_another_repo_action@main
|
||||||
env:
|
env:
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||||
with:
|
with:
|
||||||
source_file: plex-media-server-spec-dereferenced.yaml
|
source_file: ./output/plex-media-server-spec-dereferenced.yaml
|
||||||
destination_repo: lukehagar/plex-docs
|
destination_repo: lukehagar/plex-docs
|
||||||
destination_folder: static
|
destination_folder: static
|
||||||
user_email: lukeslakemail@gmail.com
|
user_email: lukeslakemail@gmail.com
|
||||||
user_name: lukehagar
|
user_name: lukehagar
|
||||||
commit_message: Updating PMS Spec
|
commit_message: Updating PMS Spec
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
|
|||||||
17
.github/workflows/openapi-linting.yaml
vendored
17
.github/workflows/openapi-linting.yaml
vendored
@@ -2,16 +2,23 @@ name: Linting
|
|||||||
"on":
|
"on":
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- pms-spec.yaml
|
- src/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout PR branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: bun install
|
||||||
|
|
||||||
- name: Install Speakeasy CLI
|
- name: Install Speakeasy CLI
|
||||||
run: |
|
run: bun run setup-speakeasy-cli
|
||||||
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
|
|
||||||
|
|
||||||
- name: OpenAPI Lint
|
- name: OpenAPI Lint
|
||||||
run: speakeasy lint openapi -s pms-spec.yaml
|
run: bun run lint
|
||||||
|
|||||||
5
.github/workflows/sdk_generation.yaml
vendored
5
.github/workflows/sdk_generation.yaml
vendored
@@ -17,11 +17,8 @@ permissions:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- pms-spec.yaml
|
|
||||||
- .github/workflows/sdk_generation.yaml
|
- .github/workflows/sdk_generation.yaml
|
||||||
- paths/**
|
- src/**
|
||||||
- parameters/**
|
|
||||||
- responses/**
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ workflow:
|
|||||||
sources:
|
sources:
|
||||||
Plex-API:
|
Plex-API:
|
||||||
inputs:
|
inputs:
|
||||||
- location: pms-spec.yaml
|
- location: ./src/pms-spec.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
||||||
targets: {}
|
targets: {}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ speakeasyVersion: latest
|
|||||||
sources:
|
sources:
|
||||||
Plex-API:
|
Plex-API:
|
||||||
inputs:
|
inputs:
|
||||||
- location: pms-spec.yaml
|
- location: ./src/pms-spec.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
||||||
targets: {}
|
targets: {}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
|
"build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
|
||||||
"test": "bun run bundle && vitest --run",
|
"test": "bun run build && vitest --run",
|
||||||
"setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh",
|
"setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh",
|
||||||
"lint": "speakeasy lint openapi -s ./src/pms-spec.yaml",
|
"lint": "speakeasy lint openapi -s ./src/pms-spec.yaml",
|
||||||
"lint-bundled": "bun run bundle && speakeasy lint openapi -s ./output/plex-media-server-spec-dereferenced.yaml"
|
"lint-bundled": "bun run build && speakeasy lint openapi -s ./output/plex-media-server-spec-dereferenced.yaml"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import PMSSpec from '../plex-media-server-spec-dereferenced.yaml'
|
import PMSSpec from '../../output/plex-media-server-spec-dereferenced.yaml';
|
||||||
import Ajv from "ajv";
|
import Ajv from "ajv";
|
||||||
import addFormats from "ajv-formats";
|
import addFormats from "ajv-formats";
|
||||||
import {expect} from 'vitest'
|
import {expect} from 'vitest'
|
||||||
|
|||||||
Reference in New Issue
Block a user