mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 07:11:10 +00:00
Improves OpenApi documentation
This commit is contained in:
1 parent
f2703b86c5
commit
77f95708b9
101 files changed
+2336
-294
No files matched your search
+2
-2
@@ -156,9 +156,9 @@ public class GetDirectoriesEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/directories/get-directories");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -332,9 +332,9 @@ public class GetDirectoryTreeEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/directories/get-directory-tree");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -361,9 +361,9 @@ public class GetDirectoryTreeEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/directories/get-directory-tree");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -199,9 +199,9 @@ public class GetTreeDirectoriesEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/directories/get-tree-directories");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -195,9 +195,9 @@ public class GetFilesEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/files/get-files");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -195,9 +195,9 @@ public class GetTreeFilesEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/files/get-tree-files");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -77,9 +77,9 @@ public class CombinePathEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/combine");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -118,9 +118,9 @@ public class GetPathParentEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/get-path-parent");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -145,9 +145,9 @@ public class GetPathParentEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/get-path-parent");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -75,9 +75,9 @@ public class GetPathRootEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/get-path-root");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -102,9 +102,9 @@ public class GetPathRootEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/get-path-root");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -75,9 +75,9 @@ public class SplitPathEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/split");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -101,9 +101,9 @@ public class SplitPathEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/path/split");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -99,9 +99,9 @@ public class GetThumbnailEndpointTests : IClassFixture<LuminaApiFactory>, IClass
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/thumbnails/get-thumbnail");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -125,9 +125,9 @@ public class GetThumbnailEndpointTests : IClassFixture<LuminaApiFactory>, IClass
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/thumbnails/get-thumbnail");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+4
-4
@@ -106,8 +106,8 @@ public class ChangePasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDis
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/change-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -189,8 +189,8 @@ public class ChangePasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDis
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/change-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -217,8 +217,8 @@ public class LoginEndpointTests : IClassFixture<LuminaApiFactory>, IDisposable
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/login");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+8
-8
@@ -153,8 +153,8 @@ public class RecoverPasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDi
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/recover-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -179,8 +179,8 @@ public class RecoverPasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDi
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/recover-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -210,8 +210,8 @@ public class RecoverPasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDi
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/recover-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
@@ -255,8 +255,8 @@ public class RecoverPasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDi
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/auth/recover-password");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+2
-2
@@ -1577,9 +1577,9 @@ public class AddBookEndpointTests : IClassFixture<LuminaApiFactory>
|
||||
Dictionary<string, JsonElement>? problemDetails = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(content, _jsonOptions);
|
||||
problemDetails.Should().NotBeNull();
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemDetails["title"].GetString().Should().Be("Validation Error");
|
||||
problemDetails["title"].GetString().Should().Be("General.Validation");
|
||||
problemDetails["instance"].GetString().Should().Be("/api/v1/books");
|
||||
problemDetails["detail"].GetString().Should().Be("One or more validation errors occurred.");
|
||||
problemDetails["detail"].GetString().Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ public class AuthLoginTests : IClassFixture<LuminaApiFactory>, IDisposable
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("15");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Reset");
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class AuthRecoverPasswordTests : IClassFixture<LuminaApiFactory>, IDispos
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("15");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Reset");
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ public class AuthRegisterTests : IClassFixture<LuminaApiFactory>, IDisposable
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("15");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Reset");
|
||||
|
||||
+6
-6
@@ -57,8 +57,8 @@ public class BaseEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().HaveCount(2);
|
||||
validationProblemDetails.Errors["Code1"].Should().BeEquivalentTo(["Description1"]);
|
||||
@@ -112,8 +112,8 @@ public class BaseEndpointTests
|
||||
ProblemHttpResult problemResult = (ProblemHttpResult)result;
|
||||
problemResult.StatusCode.Should().Be(422);
|
||||
problemResult.ProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
problemResult.ProblemDetails.Title.Should().Be("Validation Error");
|
||||
problemResult.ProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
problemResult.ProblemDetails.Title.Should().Be("General.Validation");
|
||||
problemResult.ProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
problemResult.ProblemDetails.Instance.Should().NotBeNull();
|
||||
problemResult.ProblemDetails.Extensions.Should().ContainKey("traceId");
|
||||
}
|
||||
@@ -159,8 +159,8 @@ public class BaseEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().HaveCount(2);
|
||||
validationProblemDetails.Errors["Code1"].Should().BeEquivalentTo(["Description1"]);
|
||||
|
||||
+2
-2
@@ -108,8 +108,8 @@ public class GetDirectoriesEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ public class GetDirectoryTreeEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ public class GetTreeDirectoriesEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -110,8 +110,8 @@ public class GetFilesEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ public class GetTreeFilesEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ public class CombinePathEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -109,8 +109,8 @@ public class GetPathParentEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ public class GetPathRootEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -82,8 +82,8 @@ public class SplitPathEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ public class GetThumbnailEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Detail.Should().Be("One or more validation errors occurred.");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Detail.Should().Be("OneOrMoreValidationErrorsOccurred");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class ChangePasswordEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class LoginEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class RecoverPasswordEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ public class RegisterEndpointTests
|
||||
.Returns(expectedError);
|
||||
|
||||
// Act
|
||||
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
|
||||
IResult result = await _sut. ExecuteAsync(request, cancellationToken);
|
||||
|
||||
// Assert
|
||||
result.Should().BeOfType<ProblemHttpResult>();
|
||||
@@ -79,7 +79,7 @@ public class RegisterEndpointTests
|
||||
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
|
||||
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
|
||||
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
|
||||
validationProblemDetails.Title.Should().Be("Validation Error");
|
||||
validationProblemDetails.Title.Should().Be("General.Validation");
|
||||
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
|
||||
validationProblemDetails.Errors.Should().ContainSingle()
|
||||
.Which.Should().BeEquivalentTo(new
|
||||
|
||||
Reference in new issue
Block a user