Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/advplyr/audiobookshelf
Self-hosted audiobook and podcast server
https://github.com/advplyr/audiobookshelf
audiobook-manager audiobooks audiobookshelf podcasts self-hosted
Last synced: 3 days ago
JSON representation
Self-hosted audiobook and podcast server
- Host: GitHub
- URL: https://github.com/advplyr/audiobookshelf
- Owner: advplyr
- License: gpl-3.0
- Created: 2021-08-17T22:00:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T22:24:48.000Z (about 2 months ago)
- Last Synced: 2024-10-29T15:38:57.116Z (about 1 month ago)
- Topics: audiobook-manager, audiobooks, audiobookshelf, podcasts, self-hosted
- Language: JavaScript
- Homepage: https://audiobookshelf.org
- Size: 35.5 MB
- Stars: 6,607
- Watchers: 52
- Forks: 466
- Open Issues: 574
-
Metadata Files:
- Readme: docs/README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-homelab - Audiobookshelf - hosted audiobook and podcast server | (Apps / MediaManagement)
- awesome-nas - audiobookshelf - commit/advplyr/audiobookshelf?label= "title")|![图](https://img.shields.io/github/release-date/advplyr/audiobookshelf?label= "title")|![图](https://img.shields.io/github/license/advplyr/audiobookshelf?label= "title")|![图](https://img.shields.io/github/stars/advplyr/audiobookshelf?label=&style=flat "title")|![图](https://img.shields.io/github/languages/top/advplyr/audiobookshelf "title")| (Media)
- awesome-github-repos - advplyr/audiobookshelf - Self-hosted audiobook and podcast server (JavaScript)
README
# OpenAPI specification
This directory includes the OpenAPI spec for the ABS server. The spec is made up of a number of individual `yaml` files located here and in the subfolders, with `root.yaml` being the file that references all of the others. The files are organized to have the same hierarchy as the server source files. The full spec is bundled into one file in `openapi.json`.
The spec is linted and bundled using [`redocly-cli`](https://redocly.com/docs/cli/). This tool also generates HTML docs for the spec.
The tools created by [`pb33f`](https://pb33f.io/), specifically `vacuum` and `wiretap`, are also useful for linting and verification. These tools check for some other things, such as validating requests to and responses from the server.
### Bundling the spec
The command used to bundle the spec into a `yaml` file is `redocly bundle root.yaml > bundled.yaml`.
The `yq` tool is used to convert the `yaml` to a `json` using the `yq -p yaml -o json bundled.yaml > openapi.json`.
### Linting the spec
The command used to lint the spec is `redocly lint root.yaml`
To generate an HTML report using `vacuum`, you can use `vacuum html-report [file]` to generate `report.html` and view the report in your browser.
### Generating documentation
Redocly allows for creating a static HTML page to document the API. This is done by using `redocly build-docs [file]` and supports exploded specs.
### Putting it all together
The full command that I run to bundle the spec and generate the documentation is:
```
redocly bundle root.yaml > bundled.yaml && \
yq -p yaml -o json bundled.yaml > openapi.json && \
redocly build-docs openapi.json
```