feat: ajout de la fonctionnalité d'édition des mangas, incluant la création d'un modal d'édition, la mise à jour de l'API pour gérer les modifications, et l'intégration de la logique de gestion des erreurs. Tests ajoutés pour valider le bon fonctionnement de l'édition.

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-06-30 20:00:09 +02:00
parent 896c57ac34
commit 9255509042
20 changed files with 1185 additions and 11 deletions

View File

@@ -1841,6 +1841,97 @@
},
"parameters": []
},
"/api/mangas/{id}/edit": {
"put": {
"operationId": "api_mangas_idedit_put",
"tags": [
"Manga"
],
"responses": {
"200": {
"description": "Manga resource updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Manga"
}
},
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Manga.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Manga"
}
},
"application/hal+json": {
"schema": {
"$ref": "#/components/schemas/Manga.jsonhal"
}
}
},
"links": {}
},
"400": {
"description": "Invalid input"
},
"422": {
"description": "Unprocessable entity"
},
"404": {
"description": "Resource not found"
}
},
"summary": "Edit an existing manga",
"description": "Updates an existing manga with provided data (partial update supported)",
"parameters": [
{
"name": "id",
"in": "path",
"description": "EditMangaResource identifier",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
},
"style": "simple",
"explode": false,
"allowReserved": false
}
],
"requestBody": {
"description": "The updated Manga resource",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Manga"
}
},
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Manga.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Manga"
}
},
"application/hal+json": {
"schema": {
"$ref": "#/components/schemas/Manga.jsonhal"
}
}
},
"required": true
},
"deprecated": false
},
"parameters": []
},
"/api/mangas/{id}/preferred-sources": {
"get": {
"operationId": "api_mangas_idpreferred-sources_get",
@@ -3397,6 +3488,12 @@
"null"
]
},
"thumbnailUrl": {
"type": [
"string",
"null"
]
},
"rating": {
"type": [
"number",
@@ -3463,6 +3560,12 @@
"null"
]
},
"thumbnailUrl": {
"type": [
"string",
"null"
]
},
"rating": {
"type": [
"number",
@@ -3550,6 +3653,12 @@
"null"
]
},
"thumbnailUrl": {
"type": [
"string",
"null"
]
},
"rating": {
"type": [
"number",