Commit Graph

14 Commits

Author SHA1 Message Date
javier 24d703b967 Added input validation to the Authentication middleware (#5)
This PR contains the work done to improve the existing `AuthMiddleware` type to provide input validations with the `SecureValidationRule` validation rule and also, by generating the authentication information at initialization time.

Reviewed-on: #5
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-12 19:33:45 +00:00
javier a1a649838c Implemented an input validation mechanism (#4)
This PR contains the work done to implement the `ValidateInputUseCase` use case and the `InputValidationRule` protocol, that is essential to define custom validation rules for inputs. In addition, the `NotEmptyValidationRule` and `NotNilValidationRule` rules have also been implemented.

Reviewed-on: #4
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-12 13:25:25 +00:00
javier bfc9e67d38 Implemented the Authentication middleware (#3)
This PR contains the work done to implement the `AuthMiddleware` middleware, to authenticate the requests sent to the backend service, based on [their specifications](https://www.discogs.com/developers/#page:authentication).

In addition, some documentation has been added/updated and some boilerplate source code has been removed from the project.

Reviewed-on: #3
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
v0.2.0
2025-10-11 07:39:52 +00:00
javier 428eedd89d Implemented the Services and Database GET endpoints (#2)
This PR contains the work done to include the define the information sections of the `OpenAPI` specification document and all the `GET` endpoints of the _Service_ and _Database_ categories.

The following endpoints have been defined in the document, and also tested manually with `Swift`:
* GET `/`
* GET `/artists/{artist_id}`
* GET `/artists/{artist_id}/releases`
* GET `/labels/{label_id}`
* GET `/labels/{label_id}/releases`
* GET `/masters/{master_id}`
* GET `/masters/{master_id}/versions`
* GET `/releases/{release_id}`
* GET `/releases/{release_id}/rating`
* GET `/releases/{release_id}/rating/{username}`
* GET `/releases/{release_id}/stats`
* GET `/database/search`

In addition, a first version of the _Github Pages_ documentation has been generated from the `DocC` documentation catalog, and the generated Swift code from the `openapi.yaml` file.

Reviewed-on: #2
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
v0.1.0
2025-10-09 23:51:39 +00:00
javier 75251d9f9a Merge pull request 'Library setup' (#1) from library/setup into main
Reviewed-on: #1
2025-10-06 16:16:35 +00:00
javier 80ab289ae8 Added the files headers to the existing files in the project. 2025-10-06 18:10:59 +02:00
javier 66fbe46c13 Applied the Apache v2 license to the project, and added the CONTRIBUTORS and NOTICE files. 2025-10-06 18:06:01 +02:00
javier 61d7fdfe0b Added a README.md file. 2025-10-06 17:38:52 +02:00
javier 0812ee2086 Added the DocC documentation catalog to the library target. 2025-10-06 17:37:19 +02:00
javier 20a842c1d6 Added the swift-docc-plugin package as a dependency in the Package.swift file. 2025-10-06 17:34:27 +02:00
javier b2031201a8 Defined some library, packages, documentation and IDE tasks in the Makefile file. 2025-10-06 17:33:10 +02:00
javier 4dac2d9308 Defined the folders and files to ignore in the .gitignore file. 2025-10-06 17:31:04 +02:00
javier bb8d2be87f Defined the platforms, product, and targets to start work in the Package.swift file. 2025-10-06 17:29:09 +02:00
javier 21a8f20a62 Initial Commit 2025-10-06 17:14:31 +02:00