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
1c49eb492a
commit
88447bbbf8
@ -29,10 +29,12 @@ class NewsItemNormalizer implements NormalizerInterface
|
|||||||
return [
|
return [
|
||||||
'id' => $newsItem->getId(),
|
'id' => $newsItem->getId(),
|
||||||
'type' => 'news',
|
'type' => 'news',
|
||||||
'title' => $newsItem->getTitle(),
|
'metadata' => [
|
||||||
'content' => $newsItem->getContent(),
|
'title' => $newsItem->getTitle(),
|
||||||
'startdate' => $newsItem->getStartDate(),
|
'content' => $newsItem->getContent(),
|
||||||
'enddate' => $newsItem->getEndDate()
|
'startdate' => $newsItem->getStartDate(),
|
||||||
|
'enddate' => $newsItem->getEndDate()
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,14 +144,18 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
title:
|
metadata:
|
||||||
type: string
|
type: object
|
||||||
content:
|
properties:
|
||||||
type: string
|
title:
|
||||||
startdate:
|
type: string
|
||||||
$ref: "#/components/schemas/Date"
|
content:
|
||||||
enddate:
|
type: string
|
||||||
$ref: "#/components/schemas/Date"
|
startdate:
|
||||||
|
$ref: "#/components/schemas/Date"
|
||||||
|
enddate:
|
||||||
|
$ref: "#/components/schemas/Date"
|
||||||
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/1.0/search.json:
|
/1.0/search.json:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user