mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 23:39:52 +00:00
restructure json data
This commit is contained in:
parent
3a6d5fc22a
commit
e97571059c
@ -29,10 +29,12 @@ class NewsItemNormalizer implements NormalizerInterface
|
|||||||
return [
|
return [
|
||||||
'id' => $newsItem->getId(),
|
'id' => $newsItem->getId(),
|
||||||
'type' => 'news',
|
'type' => 'news',
|
||||||
|
'metadata' => [
|
||||||
'title' => $newsItem->getTitle(),
|
'title' => $newsItem->getTitle(),
|
||||||
'content' => $newsItem->getContent(),
|
'content' => $newsItem->getContent(),
|
||||||
'startdate' => $newsItem->getStartDate(),
|
'startdate' => $newsItem->getStartDate(),
|
||||||
'enddate' => $newsItem->getEndDate()
|
'enddate' => $newsItem->getEndDate()
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,6 +144,9 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
content:
|
content:
|
||||||
@ -153,6 +156,7 @@ components:
|
|||||||
enddate:
|
enddate:
|
||||||
$ref: "#/components/schemas/Date"
|
$ref: "#/components/schemas/Date"
|
||||||
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/1.0/search.json:
|
/1.0/search.json:
|
||||||
get:
|
get:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user