Added a way to get a leaderboard by its slug GET /api/leaderboards/{slug}
Refactored the leaderboard tests with Bogus and FluentAssertions
Added Bearer auth to the OpenAPI spec (also adds it to Swagger UI)
Notes
I broke the current ViewModel guideline to show what I think would be better (this wasn't possible before the project was upgraded to .NET 7):
Each property should be required
A ViewModel should have a static MapFrom(TDomainEntity entity) method.
The required keyword ensures every property has been mapped. It doesn't work inside the constructor though so it needs to be a method.
Closes #136
Changes summary
Leaderboard
andCategory
GET /api/leaderboards/{slug}
Notes
I broke the current ViewModel guideline to show what I think would be better (this wasn't possible before the project was upgraded to .NET 7):
required
MapFrom(TDomainEntity entity)
method. Therequired
keyword ensures every property has been mapped. It doesn't work inside the constructor though so it needs to be a method.