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