[PR #3226] [CLOSED] Express validator #3908

Closed
opened 2026-04-25 00:17:32 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3226
Author: @nichwall
Created: 8/4/2024
Status: Closed

Base: masterHead: express-validator


📝 Commits (3)

  • 4bf2795 Add middleware
  • 0585f81 Add: old podcast ID to unknown formats
  • 7ba243a Disable validator by default and add description comment

📊 Changes

3 files changed (+476 additions, -3 deletions)

View changed files

📝 package-lock.json (+438 -3)
📝 package.json (+1 -0)
📝 server/Server.js (+37 -0)

📄 Description

This PR adds an OpenAPI validator to the server. This validator uses the express-openapi-validator library which is added as a dev dependency. The validator will only run in dev environments if the user has removed the false check to prevent inadvertent errors due to requests and responses not matching the OpenAPI spec.

This was originally mentioned in https://github.com/advplyr/audiobookshelf/pull/3094, but split up into 2 different PRs and had more time to test this validator.

Related to https://github.com/advplyr/audiobookshelf/issues/1434


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3226 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 8/4/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `express-validator` --- ### 📝 Commits (3) - [`4bf2795`](https://github.com/advplyr/audiobookshelf/commit/4bf279588baa4748c0139bcda25f40c8dcbbf560) Add middleware - [`0585f81`](https://github.com/advplyr/audiobookshelf/commit/0585f81523dc5fa31cf6a30505383349e4df4452) Add: old podcast ID to unknown formats - [`7ba243a`](https://github.com/advplyr/audiobookshelf/commit/7ba243ac810b5368b05164972e2caf3fffc75b40) Disable validator by default and add description comment ### 📊 Changes **3 files changed** (+476 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+438 -3) 📝 `package.json` (+1 -0) 📝 `server/Server.js` (+37 -0) </details> ### 📄 Description This PR adds an OpenAPI validator to the server. This validator uses the `express-openapi-validator` library which is added as a dev dependency. The validator will only run in dev environments if the user has removed the `false` check to prevent inadvertent errors due to requests and responses not matching the OpenAPI spec. This was originally mentioned in https://github.com/advplyr/audiobookshelf/pull/3094, but split up into 2 different PRs and had more time to test this validator. Related to https://github.com/advplyr/audiobookshelf/issues/1434 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:32 +02:00
adam closed this issue 2026-04-25 00:17:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3908