diff --git a/.github/workflows/deref-spec.yml b/.github/workflows/deref-spec.yml new file mode 100644 index 00000000..670a2f11 --- /dev/null +++ b/.github/workflows/deref-spec.yml @@ -0,0 +1,27 @@ +name: "Build Dereferenced Plex API Spec" + +on: + push: + branches: + - main + paths: + - referenced/** + workflow_dispatch: + +jobs: + dereference_api: + runs-on: ubuntu-latest + 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: Dereference Plex API Specification + run: | + swagger-cli bundle --dereference referenced\plex-api-spec.yaml -t yaml -o plex-api-spec-dereferenced.yaml + - uses: stefanzweifel/git-auto-commit-action@v4 \ No newline at end of file diff --git a/referenced/paths/activities-cancel.yaml b/referenced/paths/activities-cancel.yaml index ddf11542..ed3cf95b 100644 --- a/referenced/paths/activities-cancel.yaml +++ b/referenced/paths/activities-cancel.yaml @@ -15,9 +15,5 @@ delete: responses: "200": description: The Server Activity was canceled - content: - application/json: - schema: - $ref: "../schemas/ServerActivities.yaml" "401": $ref: "../responses/401.yaml" diff --git a/referenced/paths/activities.yaml b/referenced/paths/activities.yaml index 915c378f..f6cc950a 100644 --- a/referenced/paths/activities.yaml +++ b/referenced/paths/activities.yaml @@ -10,6 +10,36 @@ get: content: application/json: schema: - $ref: "../schemas/ServerActivities.yaml" + type: object + properties: + MediaContainer: + type: object + properties: + size: + type: number + Activity: + type: array + items: + type: object + properties: + uuid: + type: string + type: + type: string + cancellable: + type: boolean + userID: + type: number + title: + type: string + subtitle: + type: string + progress: + type: number + Context: + type: object + properties: + librarySectionID: + type: string "401": $ref: "../responses/401.yaml" diff --git a/referenced/paths/root.yaml b/referenced/paths/root.yaml index 6d6310d3..9bbf0861 100644 --- a/referenced/paths/root.yaml +++ b/referenced/paths/root.yaml @@ -10,6 +10,122 @@ get: content: application/json: schema: - $ref: "../schemas/ServerCapabilities.yaml" + type: object + properties: + MediaContainer: + type: object + properties: + size: + type: number + allowCameraUpload: + type: boolean + allowChannelAccess: + type: boolean + allowMediaDeletion: + type: boolean + allowSharing: + type: boolean + allowSync: + type: boolean + allowTuners: + type: boolean + backgroundProcessing: + type: boolean + certificate: + type: boolean + companionProxy: + type: boolean + countryCode: + type: string + diagnostics: + type: string + eventStream: + type: boolean + friendlyName: + type: string + hubSearch: + type: boolean + itemClusters: + type: boolean + livetv: + type: number + machineIdentifier: + type: string + mediaProviders: + type: boolean + multiuser: + type: boolean + musicAnalysis: + type: number + myPlex: + type: boolean + myPlexMappingState: + type: string + myPlexSigninState: + type: string + myPlexSubscription: + type: boolean + myPlexUsername: + type: string + offlineTranscode: + type: number + ownerFeatures: + type: string + photoAutoTag: + type: boolean + platform: + type: string + platformVersion: + type: string + pluginHost: + type: boolean + pushNotifications: + type: boolean + readOnlyLibraries: + type: boolean + streamingBrainABRVersion: + type: number + streamingBrainVersion: + type: number + sync: + type: boolean + transcoderActiveVideoSessions: + type: number + transcoderAudio: + type: boolean + transcoderLyrics: + type: boolean + transcoderPhoto: + type: boolean + transcoderSubtitles: + type: boolean + transcoderVideo: + type: boolean + transcoderVideoBitrates: + type: string + transcoderVideoQualities: + type: string + transcoderVideoResolutions: + type: string + updatedAt: + type: number + updater: + type: boolean + version: + type: string + voiceSearch: + type: boolean + Directory: + type: array + items: + type: object + properties: + count: + type: number + key: + type: string + title: + type: string + "401": $ref: "../responses/401.yaml" diff --git a/referenced/schemas/ServerActivities.yaml b/referenced/schemas/ServerActivities.yaml deleted file mode 100644 index 6a447da9..00000000 --- a/referenced/schemas/ServerActivities.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -properties: - MediaContainer: - type: object - properties: - size: - type: number - Activity: - type: array - items: - type: object - properties: - uuid: - type: string - type: - type: string - cancellable: - type: boolean - userID: - type: number - title: - type: string - subtitle: - type: string - progress: - type: number - Context: - type: object - properties: - librarySectionID: - type: string diff --git a/referenced/schemas/ServerCapabilities.yaml b/referenced/schemas/ServerCapabilities.yaml deleted file mode 100644 index 37d7b51f..00000000 --- a/referenced/schemas/ServerCapabilities.yaml +++ /dev/null @@ -1,116 +0,0 @@ -type: object -properties: - MediaContainer: - type: object - properties: - size: - type: number - allowCameraUpload: - type: boolean - allowChannelAccess: - type: boolean - allowMediaDeletion: - type: boolean - allowSharing: - type: boolean - allowSync: - type: boolean - allowTuners: - type: boolean - backgroundProcessing: - type: boolean - certificate: - type: boolean - companionProxy: - type: boolean - countryCode: - type: string - diagnostics: - type: string - eventStream: - type: boolean - friendlyName: - type: string - hubSearch: - type: boolean - itemClusters: - type: boolean - livetv: - type: number - machineIdentifier: - type: string - mediaProviders: - type: boolean - multiuser: - type: boolean - musicAnalysis: - type: number - myPlex: - type: boolean - myPlexMappingState: - type: string - myPlexSigninState: - type: string - myPlexSubscription: - type: boolean - myPlexUsername: - type: string - offlineTranscode: - type: number - ownerFeatures: - type: string - photoAutoTag: - type: boolean - platform: - type: string - platformVersion: - type: string - pluginHost: - type: boolean - pushNotifications: - type: boolean - readOnlyLibraries: - type: boolean - streamingBrainABRVersion: - type: number - streamingBrainVersion: - type: number - sync: - type: boolean - transcoderActiveVideoSessions: - type: number - transcoderAudio: - type: boolean - transcoderLyrics: - type: boolean - transcoderPhoto: - type: boolean - transcoderSubtitles: - type: boolean - transcoderVideo: - type: boolean - transcoderVideoBitrates: - type: string - transcoderVideoQualities: - type: string - transcoderVideoResolutions: - type: string - updatedAt: - type: number - updater: - type: boolean - version: - type: string - voiceSearch: - type: boolean - Directory: - type: array - items: - type: object - properties: - count: - type: number - key: - type: string - title: - type: string