mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 04:11:43 +00:00
Add: format and unknownFormats
This commit is contained in:
parent
327ddd8ec5
commit
0a4d24f1b3
1 changed files with 9 additions and 0 deletions
|
|
@ -217,6 +217,15 @@ class Server {
|
|||
console.debug(body)
|
||||
}
|
||||
},
|
||||
formats: [
|
||||
// Define custom format types for OpenAPI spec
|
||||
{
|
||||
name: 'uuid',
|
||||
type: 'string',
|
||||
validate: (v) => /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(v.toString())
|
||||
}
|
||||
],
|
||||
unknownFormats: ['li_[a-z0-9]{18}', '[0-9]*'],
|
||||
ignoreUndocumented: true
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue