Implemented the POST /marketplace/listings endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-10-21 20:49:56 +02:00
parent 1ac2629d56
commit 2320e878b7
+53
View File
@@ -1975,6 +1975,42 @@ paths:
$ref: '#/components/responses/NotAccessable'
'500':
$ref: '#/components/responses/InternalError'
/marketplace/listings:
post:
tags:
- Marketplace
summary: Create a new listing in a marketplace.
description: |
Createa a new listing in a marketplace.
This endpoint requires authentication, to add a listing into an inventory of an authenticated user.
operationId: createListing
requestBody:
$ref: '#/components/requestBodies/Listing'
security:
- ConsumerKeySecret: []
- UserToken: []
- OAuth: []
responses:
'201':
description: Successfully added a listing into a marketplace.
headers:
X-Discogs-RateLimit:
$ref: '#/components/headers/RateLimit'
X-Discogs-RateLimit-Used:
$ref: '#/components/headers/RateLimitUsed'
X-Discogs-RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
content:
application/json:
schema:
$ref: '#/components/schemas/ListingId'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/NotAccessable'
'500':
$ref: '#/components/responses/InternalError'
components:
headers:
Link:
@@ -3188,6 +3224,23 @@ components:
- sleeve_condition
- status
- uri
ListingId:
description: A type that references a listing.
type: object
properties:
listing_id:
description: An identifier of a listing.
type: integer
minimum: 0
readOnly: true
resource_url:
description: A URI resource of a listing.
type: string
format: uri
readOnly: true
required:
- listing_id
- resource_url
Master:
description: A type that represents a set of similar releases.
type: object