mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-15 01:40:44 +02:00
MetadataSearchResult data annotations
This commit is contained in:
@@ -1,3 +1,37 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace API.Schema.MangaContext.MetadataFetchers;
|
namespace API.Schema.MangaContext.MetadataFetchers;
|
||||||
|
|
||||||
public record MetadataSearchResult(string Identifier, string Name, string Url, string? Description = null, string? CoverUrl = null);
|
public record MetadataSearchResult(
|
||||||
|
string Identifier,
|
||||||
|
string Name,
|
||||||
|
string Url,
|
||||||
|
string? Description = null,
|
||||||
|
string? CoverUrl = null)
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Identifier specific to the MetadataFetcher
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string Identifier { get; init; } = Identifier;
|
||||||
|
/// <summary>
|
||||||
|
/// Name of the Manga
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string Name { get; init; } = Name;
|
||||||
|
/// <summary>
|
||||||
|
/// Url to the result
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string Url { get; init; } = Url;
|
||||||
|
/// <summary>
|
||||||
|
/// Description of the Manga
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string? Description { get; init; } = Description;
|
||||||
|
/// <summary>
|
||||||
|
/// Url to the cover if available
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string? CoverUrl { get; init; } = CoverUrl;
|
||||||
|
}
|
@@ -3679,27 +3679,39 @@
|
|||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"MetadataSearchResult": {
|
"MetadataSearchResult": {
|
||||||
|
"required": [
|
||||||
|
"coverUrl",
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"name",
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
|
"minLength": 1,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"description": "Identifier specific to the MetadataFetcher"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
|
"minLength": 1,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"description": "Name of the Manga"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
|
"minLength": 1,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"description": "Url to the result"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
|
"minLength": 1,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"description": "Description of the Manga"
|
||||||
},
|
},
|
||||||
"coverUrl": {
|
"coverUrl": {
|
||||||
|
"minLength": 1,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"description": "Url to the cover if available"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
Reference in New Issue
Block a user