mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Add specification
This commit is contained in:
		
							parent
							
								
									8027c4a06f
								
							
						
					
					
						commit
						08a41e37b4
					
				
							
								
								
									
										124
									
								
								custom-metadata-provider-specification.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								custom-metadata-provider-specification.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,124 @@ | ||||
| openapi: 3.0.0 | ||||
| servers:  | ||||
|   - url: https://example.com | ||||
|     description: Local server  | ||||
| info: | ||||
|   license:  | ||||
|     name: MIT | ||||
|     url: https://opensource.org/licenses/MIT | ||||
| 
 | ||||
|      | ||||
|   title: Custom Metadata Provider | ||||
|   version: 0.1.0 | ||||
| security: | ||||
|   - api_key: [] | ||||
| 
 | ||||
| paths: | ||||
|   /search: | ||||
|     get: | ||||
|       description: Search for books | ||||
|       operationId: search | ||||
|       summary: Search for books | ||||
|       security:  | ||||
|         -  api_key: [] | ||||
|       parameters: | ||||
|         - name: query | ||||
|           in: query | ||||
|           required: true | ||||
|           schema: | ||||
|             type: string | ||||
|         - name: author | ||||
|           in: query | ||||
|           required: false | ||||
|           schema: | ||||
|             type: string | ||||
|       responses: | ||||
|         "200": | ||||
|           description: OK | ||||
|           content: | ||||
|             application/json: | ||||
|               schema: | ||||
|                 type: object | ||||
|                 properties: | ||||
|                   matches: | ||||
|                     type: array | ||||
|                     items: | ||||
|                       $ref: "#/components/schemas/BookMetadata" | ||||
|         "400": | ||||
|           description: Bad Request | ||||
|           content: | ||||
|             application/json: | ||||
|               schema: | ||||
|                 type: object | ||||
|                 properties: | ||||
|                   error: | ||||
|                     type: string | ||||
|         "401": | ||||
|           description: Unauthorized | ||||
|           content: | ||||
|             application/json: | ||||
|               schema: | ||||
|                 type: object | ||||
|                 properties: | ||||
|                   error: | ||||
|                     type: string | ||||
|         "500": | ||||
|           description: Internal Server Error | ||||
|           content: | ||||
|             application/json: | ||||
|               schema: | ||||
|                 type: object | ||||
|                 properties: | ||||
|                   error: | ||||
|                     type: string | ||||
| components: | ||||
|   schemas: | ||||
|     BookMetadata: | ||||
|       type: object | ||||
|       properties: | ||||
|         title: | ||||
|           type: string | ||||
|         subtitle: | ||||
|           type: string | ||||
|         author: | ||||
|           type: string | ||||
|         narrator: | ||||
|           type: string | ||||
|         publisher: | ||||
|           type: string | ||||
|         published_year: | ||||
|           type: string | ||||
|         description: | ||||
|           type: string | ||||
|         cover: | ||||
|           type: string | ||||
|           description: URL to the cover image | ||||
|         isbn: | ||||
|           type: string | ||||
|           format: isbn | ||||
|         asin: | ||||
|           type: string | ||||
|           format: asin | ||||
|         genres: | ||||
|           type: array | ||||
|           items: | ||||
|             type: string | ||||
|         tags: | ||||
|           type: array | ||||
|           items: | ||||
|             type: string | ||||
|         language: | ||||
|           type: string | ||||
|         duration: | ||||
|           type: number | ||||
|           format: int64 | ||||
|           description: Duration in seconds | ||||
|       required:  | ||||
|         -  title | ||||
|   securitySchemes: | ||||
|     api_key: | ||||
|       type: apiKey | ||||
|       name: AUTHORIZATION | ||||
|       in: header | ||||
|          | ||||
|            | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user