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:
31
.github/workflows/build-and-copy-pms-spec.yml
vendored
31
.github/workflows/build-and-copy-pms-spec.yml
vendored
@@ -5,11 +5,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "pms-spec.yaml"
|
||||
- "parameters/**"
|
||||
- "responses/**"
|
||||
- "paths/**"
|
||||
|
||||
- src/**
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -18,28 +15,30 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16"
|
||||
- name: Install swagger-cli
|
||||
run: |
|
||||
npm install -g swagger-cli
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Dereference Plex Media Server Specification
|
||||
run: |
|
||||
swagger-cli bundle --dereference pms-spec.yaml -t yaml -o plex-media-server-spec-dereferenced.yaml
|
||||
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"
|
||||
|
||||
- name: Pushes Dereferenced Specification File
|
||||
uses: dmnemec/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source_file: plex-media-server-spec-dereferenced.yaml
|
||||
source_file: ./output/plex-media-server-spec-dereferenced.yaml
|
||||
destination_repo: lukehagar/plex-docs
|
||||
destination_folder: static
|
||||
user_email: lukeslakemail@gmail.com
|
||||
user_name: lukehagar
|
||||
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":
|
||||
pull_request:
|
||||
paths:
|
||||
- pms-spec.yaml
|
||||
- src/**
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
run: |
|
||||
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
|
||||
run: bun run setup-speakeasy-cli
|
||||
|
||||
- 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:
|
||||
- main
|
||||
paths:
|
||||
- pms-spec.yaml
|
||||
- .github/workflows/sdk_generation.yaml
|
||||
- paths/**
|
||||
- parameters/**
|
||||
- responses/**
|
||||
- src/**
|
||||
jobs:
|
||||
generate:
|
||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||
|
||||
@@ -14,7 +14,7 @@ workflow:
|
||||
sources:
|
||||
Plex-API:
|
||||
inputs:
|
||||
- location: pms-spec.yaml
|
||||
- location: ./src/pms-spec.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
||||
targets: {}
|
||||
|
||||
@@ -3,7 +3,7 @@ speakeasyVersion: latest
|
||||
sources:
|
||||
Plex-API:
|
||||
inputs:
|
||||
- location: pms-spec.yaml
|
||||
- location: ./src/pms-spec.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api
|
||||
targets: {}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"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",
|
||||
"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": [],
|
||||
"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 addFormats from "ajv-formats";
|
||||
import {expect} from 'vitest'
|
||||
|
||||
Reference in New Issue
Block a user