Implemented the GET /users/{username}/collection/fields endpoint for the Open API specification document in the library target.
This commit is contained in:
@@ -1453,6 +1453,51 @@ paths:
|
|||||||
$ref: '#/components/responses/NotFound'
|
$ref: '#/components/responses/NotFound'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalError'
|
$ref: '#/components/responses/InternalError'
|
||||||
|
/users/{username}/collection/fields:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- User Collection
|
||||||
|
summary: Get a list of custom fields defined by a user.
|
||||||
|
description: |
|
||||||
|
Retrieves a list of collection notes fields defined by a user.
|
||||||
|
|
||||||
|
These fields are available on every release in a collection. In case a collection has been made private by its owner, then the endpoints requires authentication as the collection owner. Otherwise only public custom fields will be visible.
|
||||||
|
operationId: getCustomFields
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/Username'
|
||||||
|
security:
|
||||||
|
- ConsumerKeySecret: []
|
||||||
|
- UserToken: []
|
||||||
|
- OAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved a list of custom fields defined by a user.
|
||||||
|
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:
|
||||||
|
description: A type that contains a list of retrieved custom fields of a user.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
fields:
|
||||||
|
description: A list of custom fields.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/CustomField'
|
||||||
|
required:
|
||||||
|
- fields
|
||||||
|
'403':
|
||||||
|
$ref: '#/components/responses/NotAccessable'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/NotFound'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalError'
|
||||||
components:
|
components:
|
||||||
headers:
|
headers:
|
||||||
Link:
|
Link:
|
||||||
@@ -1978,6 +2023,45 @@ components:
|
|||||||
- NZD
|
- NZD
|
||||||
- SEK
|
- SEK
|
||||||
- ZAR
|
- ZAR
|
||||||
|
CustomField:
|
||||||
|
description: A type that represents a custom field.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: An identifier of a custom field.
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
name:
|
||||||
|
description: A name of a custom field.
|
||||||
|
type: string
|
||||||
|
position:
|
||||||
|
description: A position of a custom field.
|
||||||
|
type: integer
|
||||||
|
minimum: 1
|
||||||
|
public:
|
||||||
|
description: A flag that indicates whether a custom field is public or not.
|
||||||
|
type: boolean
|
||||||
|
type:
|
||||||
|
description: A type of a custom field.
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- dropdown
|
||||||
|
- textarea
|
||||||
|
lines:
|
||||||
|
description: A number of lines of content to allow for a custom field of a textarea type.
|
||||||
|
type: integer
|
||||||
|
minimum: 1
|
||||||
|
options:
|
||||||
|
description: A list of options to display, in case the field is of dropdown type.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- name
|
||||||
|
- position
|
||||||
|
- public
|
||||||
|
- type
|
||||||
Folder:
|
Folder:
|
||||||
description: A type that represents a collection folder of a user.
|
description: A type that represents a collection folder of a user.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
Reference in New Issue
Block a user