9 Commits

Author SHA1 Message Date
javier a0672cc4af Implemented the Marketplace endpoints (#15)
This PR contains the work done to implement the *Marketplace* endpoints for the **Discogs API** backend service, which include the following endpoints:
* GET `/users/{username}/inventory` endpoint
* GET `/marketplace/listings/{listing_id}` endpoint
* DELETE `/marketplace/listings/{listing_id}` endpoint
* POST `/marketplace/listings/{listing_id}` endpoint
* POST `/marketplace/listings` endpoint
* GET `/marketplace/orders` endpoint
* GET `/marketplace/orders/{order_id}` endpoint
* GET `/marketplace/orders/{order_id}/messages` endpoint
* POST `/marketplace/orders/{order_id}/messages` endpoint
* GET `/marketplace/fee/{price}` endpoint
* GET `/marketplace/fee/{price}/{currency}` endpoint
* GET `/marketplace/price_suggestions/{release_id}` endpoint
* GET `/marketplace/stats/{release_id}` endpoint

Reviewed-on: #15
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-11-10 00:34:18 +00:00
javier 63118db805 Implemented the User Lists endpoints (#14)
This PR contains the work done to implement the *User Lists* endpoints of the *Discogs API* service in the `Open API` specification document:

* GET `/users/{username}/lists`
* GET `/lists/{list_id}`

Reviewed-on: #14
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-16 17:33:15 +00:00
javier f3d5c0e6ac Implemented the User Wantlist endpoints (#13)
This PR contains the work done to implement the *User Wantlist* endpoints of the *Discogs API* online service in the `Open API` specification document:

* GET `/users/{username}/wants`
* POST `/users/{username}/wants/{release_id}`
* PUT `/users/{username}/wants/{release_id}`
* DELETE `/users/{username}/wants/{release_id}`

Reviewed-on: #13
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-16 16:24:46 +00:00
javier 2a7b9746a7 Implemented the User Collection endpoints (#12)
This PR contains the work done to implement the *User Collection* endpoints of the Discogs API into the `OpenAPI` specification document:

* GET `/users/{username}/collection/folders`
* POST `/users/{username}/collection/folders`
* GET `/users/{username}/collection/folders/{folder_id}`
* POST `/users/{username}/collection/folders/{folder_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}`
* GET `/users/{username}/collection/releases/{release_id}`
* GET `/users/{username}/collection/folders/{folder_id}/releases`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* GET `/users/{username}/collection/fields`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}/fields/{field_id}`
* GET `/users/{username}/collection/value`

Reviewed-on: #12
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-16 14:38:41 +00:00
javier 2c91cad0bf User Identity endpoints (#11)
This PR contains the work done to implement the *User Identity* endpoints of the **Discogs API** online service:
* GET `/users/{username}`
* POST `/users/{username}`
* GET `/users/{username}/contributions`
* GET `/users/{username}/submissions`

Reviewed-on: #11
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-15 21:59:32 +00:00
javier 39e9dc5d53 Fox to Authentication endpoints (#10)
This PR contains the rock done to securize the /GET `/oauth/identity` endpoints on the OpenAPI specification document, plus it also improves the endpoints ordering in the *Database* section.

Reviewed-on: #10
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 18:41:24 +00:00
javier 9a30b69561 Implemented the Authentication endpoints (#9)
This PR contains the work done to implement the *Authentication* endpoints of the Discogs API:
* GET `/oauth/request_token`
* POST `/oauth/access_token`
* GET `/oauth/identity`

Reviewed-on: #9
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 17:55:48 +00:00
javier de5b4ff5d0 Implemented the missing Database endpoints (#8)
This PR contains the work done to declare the missing, non-GET endpoints of the *Database* section in the [Discogs API documentation](https://www.discogs.com/developers#page:database) into the `OpenAPI` specification document.

Furthermore, documentation extensions have been defined for the `APIProtocol` and `Client` types in the `DocC` documentation catalog to match the categories of these endpoint calls to the categories in the Discogs documentation.

Reviewed-on: #8
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 15:20:20 +00:00
javier d01b60e6dd Added the Rate Limiting headers (#7)
This PR contains the work done to define the `RateLimit`, `RateLimitRemaining` and the `RateLimitUsed` heades into the Open API specification document, as well as including these headers as part of the response for every existing endpoint declared in the mentioned document.

In addition, the `openapi-generator-config` files was also changed to have a different naming strategy.

Reviewed-on: #7
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 13:09:10 +00:00
10993 changed files with 14300 additions and 2214 deletions
@@ -0,0 +1,133 @@
# ``APIProtocol``
## Topics
### Service endpoints
- ``APIProtocol/getService(_:)``
- ``APIProtocol/getService(headers:)``
### Authentication endpoints
- ``APIProtocol/getRequestToken(_:)``
- ``APIProtocol/getRequestToken(headers:)``
- ``APIProtocol/postAccessToken(_:)``
- ``APIProtocol/postAccessToken(headers:)``
- ``APIProtocol/getUserIdentity(_:)``
- ``APIProtocol/getUserIdentity(headers:)``
### Database endpoints
- ``APIProtocol/searchDatabase(_:)``
- ``APIProtocol/searchDatabase(query:headers:)``
- ``APIProtocol/getArtist(_:)``
- ``APIProtocol/getArtist(path:headers:)``
- ``APIProtocol/getArtistReleases(_:)``
- ``APIProtocol/getArtistReleases(path:query:headers:)``
- ``APIProtocol/getLabel(_:)``
- ``APIProtocol/getLabel(path:headers:)``
- ``APIProtocol/getLabelReleases(_:)``
- ``APIProtocol/getLabelReleases(path:query:headers:)``
- ``APIProtocol/getMaster(_:)``
- ``APIProtocol/getMaster(path:headers:)``
- ``APIProtocol/getMasterVersions(_:)``
- ``APIProtocol/getMasterVersions(path:query:headers:)``
- ``APIProtocol/getRelease(_:)``
- ``APIProtocol/getRelease(path:query:headers:)``
- ``APIProtocol/getReleaseRating(_:)``
- ``APIProtocol/getReleaseRating(path:headers:)``
- ``APIProtocol/getReleaseRatingByUser(_:)``
- ``APIProtocol/getReleaseRatingByUser(path:headers:)``
- ``APIProtocol/putReleaseRatingByUser(_:)``
- ``APIProtocol/putReleaseRatingByUser(path:query:headers:)``
- ``APIProtocol/deleteReleaseRatingByUser(_:)``
- ``APIProtocol/deleteReleaseRatingByUser(path:headers:)``
- ``APIProtocol/getReleaseStats(_:)``
- ``APIProtocol/getReleaseStats(path:headers:)``
### User Identity endpoints
- ``APIProtocol/getUserProfile(_:)``
- ``APIProtocol/getUserProfile(path:headers:)``
- ``APIProtocol/postUserProfile(_:)``
- ``APIProtocol/postUserProfile(path:query:headers:)``
- ``APIProtocol/getUserContributions(_:)``
- ``APIProtocol/getUserContributions(path:query:headers:)``
- ``APIProtocol/getUserSubmissions(_:)``
- ``APIProtocol/getUserSubmissions(path:headers:)``
### User Collection endpoints
- ``APIProtocol/getCollectionFolders(_:)``
- ``APIProtocol/getCollectionFolders(path:headers:)``
- ``APIProtocol/postCollectionFolders(_:)``
- ``APIProtocol/postCollectionFolders(path:query:headers:)``
- ``APIProtocol/getCollectionFolder(_:)``
- ``APIProtocol/getCollectionFolder(path:headers:)``
- ``APIProtocol/postCollectionFolder(_:)``
- ``APIProtocol/postCollectionFolder(path:query:headers:)``
- ``APIProtocol/deleteCollectionFolder(_:)``
- ``APIProtocol/deleteCollectionFolder(path:headers:)``
- ``APIProtocol/getCollectionItemsByRelease(_:)``
- ``APIProtocol/getCollectionItemsByRelease(path:headers:)``
- ``APIProtocol/getCollectionItemsByFolder(_:)``
- ``APIProtocol/getCollectionItemsByFolder(path:query:headers:)``
- ``APIProtocol/postReleaseToCollectionFolder(_:)``
- ``APIProtocol/postReleaseToCollectionFolder(path:headers:)``
- ``APIProtocol/postChangeRatingOfRelease(_:)``
- ``APIProtocol/postChangeRatingOfRelease(path:query:headers:body:)``
- ``APIProtocol/deleteInstanceFromCollectionFolder(_:)``
- ``APIProtocol/deleteInstanceFromCollectionFolder(path:headers:)``
- ``APIProtocol/getCustomFields(_:)``
- ``APIProtocol/getCustomFields(path:headers:)``
- ``APIProtocol/editFieldsInstance(_:)``
- ``APIProtocol/editFieldsInstance(path:query:headers:)``
- ``APIProtocol/getCollectionValue(_:)``
- ``APIProtocol/getCollectionValue(path:headers:)``
### User Wantlist endpoints
- ``APIProtocol/getWantlist(_:)``
- ``APIProtocol/getWantlist(path:query:headers:)``
- ``APIProtocol/addToWantlist(_:)``
- ``APIProtocol/addToWantlist(path:query:headers:)``
- ``APIProtocol/updateInWantlist(_:)``
- ``APIProtocol/updateInWantlist(path:query:headers:)``
- ``APIProtocol/deleteFromWantlist(_:)``
- ``APIProtocol/deleteFromWantlist(path:headers:)``
### User Lists endpoints
- ``APIProtocol/getLists(_:)``
- ``APIProtocol/getLists(path:query:headers:)``
- ``APIProtocol/getList(_:)``
- ``APIProtocol/getList(path:headers:)``
### Marketplace endpoints
- ``APIProtocol/getInventory(_:)``
- ``APIProtocol/getInventory(path:query:headers:)``
- ``APIProtocol/getListing(_:)``
- ``APIProtocol/getListing(path:query:headers:)``
- ``APIProtocol/createListing(_:)``
- ``APIProtocol/createListing(headers:body:)``
- ``APIProtocol/editListing(_:)``
- ``APIProtocol/editListing(path:headers:body:)``
- ``APIProtocol/deleteListing(_:)``
- ``APIProtocol/deleteListing(path:headers:)``
- ``APIProtocol/getOrders(_:)``
- ``APIProtocol/getOrders(query:headers:)``
- ``APIProtocol/getOrder(_:)``
- ``APIProtocol/getOrder(path:headers:)``
- ``APIProtocol/getOrderMessages(_:)``
- ``APIProtocol/getOrderMessages(path:headers:)``
- ``APIProtocol/addOrderMessage(_:)``
- ``APIProtocol/addOrderMessage(path:headers:body:)``
- ``APIProtocol/getFee(_:)``
- ``APIProtocol/getFee(path:headers:)``
- ``APIProtocol/getFeeWithCurrency(_:)``
- ``APIProtocol/getFeeWithCurrency(path:headers:)``
- ``APIProtocol/getPriceSuggestions(_:)``
- ``APIProtocol/getPriceSuggestions(path:headers:)``
- ``APIProtocol/getStatistics(_:)``
- ``APIProtocol/getStatistics(path:query:headers:)``
@@ -0,0 +1,84 @@
# ``Client``
## Topics
### Initializers
- ``Client/init(serverURL:configuration:transport:middlewares:)``
### Service endpoints
- ``Client/getService(_:)``
### Authentication endpoints
- ``Client/getRequestToken(_:)``
- ``Client/postAccessToken(_:)``
- ``Client/getUserIdentity(_:)``
### Database endpoints
- ``Client/searchDatabase(_:)``
- ``Client/getArtist(_:)``
- ``Client/getArtistReleases(_:)``
- ``Client/getLabel(_:)``
- ``Client/getLabelReleases(_:)``
- ``Client/getMaster(_:)``
- ``Client/getMasterVersions(_:)``
- ``Client/getRelease(_:)``
- ``Client/getReleaseRating(_:)``
- ``Client/getReleaseRatingByUser(_:)``
- ``Client/putReleaseRatingByUser(_:)``
- ``Client/deleteReleaseRatingByUser(_:)``
- ``Client/getReleaseStats(_:)``
### User Identity
- ``Client/getUserProfile(_:)``
- ``Client/postUserProfile(_:)``
- ``Client/getUserContributions(_:)``
- ``Client/getUserSubmissions(_:)``
### User Collection
- ``Client/getCollectionFolders(_:)``
- ``Client/postCollectionFolders(_:)``
- ``Client/getCollectionFolder(_:)``
- ``Client/postCollectionFolder(_:)``
- ``Client/deleteCollectionFolder(_:)``
- ``Client/getCollectionItemsByRelease(_:)``
- ``Client/getCollectionItemsByFolder(_:)``
- ``Client/postReleaseToCollectionFolder(_:)``
- ``Client/postChangeRatingOfRelease(_:)``
- ``Client/deleteInstanceFromCollectionFolder(_:)``
- ``Client/getCustomFields(_:)``
- ``Client/editFieldsInstance(_:)``
- ``Client/getCollectionValue(_:)``
### User Wantlist
- ``Client/getWantlist(_:)``
- ``Client/addToWantlist(_:)``
- ``Client/updateInWantlist(_:)``
- ``Client/deleteFromWantlist(_:)``
### User Lists
- ``Client/getLists(_:)``
- ``Client/getList(_:)``
### Marketplace
- ``Client/getInventory(_:)``
- ``Client/getListing(_:)``
- ``Client/createListing(_:)``
- ``Client/editListing(_:)``
- ``Client/deleteListing(_:)``
- ``Client/getOrders(_:)``
- ``Client/getOrder(_:)``
- ``Client/getOrderMessages(_:)``
- ``Client/addOrderMessage(_:)``
- ``Client/getFee(_:)``
- ``Client/getFeeWithCurrency(_:)``
- ``Client/getPriceSuggestions(_:)``
- ``Client/getStatistics(_:)``
@@ -14,7 +14,7 @@
### Servers
- ``Servers/Server1``
- ``LiveService``
### Authentication
@@ -26,7 +26,6 @@
- ``UserAgentMiddleware``
- ``Product``
- ``InputValidationError``
### Types
@@ -34,6 +33,10 @@
- ``Operations``
- ``Servers``
### Errors
- ``InputValidationError``
### Protocols
- ``APIProtocol``
@@ -0,0 +1,16 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the DiscogsService open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the DiscogsService project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of DiscogsService project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A reference to a live (or production) service defined in the OpenAPI document.
public typealias LiveService = Servers.Server1
@@ -15,5 +15,5 @@
generate:
- types
- client
namingStrategy: defensive
namingStrategy: idiomatic
accessModifier: public
File diff suppressed because it is too large Load Diff
@@ -85,7 +85,7 @@ private extension StringFunctionsTests {
private extension Input {
/// A list of strings to match against a regular expression pattern in test cases.
static let stringsToMatch: [String] = ["Some Pattern", "Some", "Some Other Pattern", "Pattern", .empty]
static let stringsToMatch: [String] = [.Pattern.sample, "Some", "Some Other Pattern", "Pattern", .empty]
}
private extension Output {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More