Skip to content

Commit

Permalink
Fix REST datetime usage (#2420)
Browse files Browse the repository at this point in the history
ibexa-types.raml: Fix DateTime and datetime

`DateTime` is a PHP class. It can't be used directly.

webapi-parser throws a "Message: 'datetime' cannot be used to name a custom type"

(cherry picked from commit fc54a1d)
  • Loading branch information
adriendupuis committed Jul 2, 2024
1 parent 5c2665f commit 8fb6bc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 88 deletions.
16 changes: 4 additions & 12 deletions docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,6 @@ DateRange:
description: 'Representation of date range.'
type: object

datetime:
description: 'Representation of date and time.'
type: object

Event:
description: 'Calendar event.'
type: BaseObject
Expand Down Expand Up @@ -2332,7 +2328,7 @@ ContentTypeCreate:
description: 'If set, this value overrides the current user as creator.'
type: any
creationDate:
type: DateTime
type: datetime

ContentTypeUpdate:
description: 'This class is used to update a content type.'
Expand Down Expand Up @@ -2366,7 +2362,7 @@ ContentTypeUpdate:
description: 'If set, this value overrides the current user as creator.'
type: any
modificationDate:
type: DateTime
type: datetime

ViewInput:
description: 'This class represents a View input.'
Expand Down Expand Up @@ -3488,10 +3484,6 @@ VatCategory:
vatValue:
type: number

DateTime:
description: https://www.php.net/manual/en/class.datetime.php
type: object

ContentUpdate:
description: 'This class is used to update a Content.'
type: object
Expand All @@ -3516,9 +3508,9 @@ ContentMetadataUpdate:
ownerId:
type: any
publishedDate:
type: DateTime
type: datetime
modificationDate:
type: DateTime
type: datetime
mainLanguageCode:
type: string
alwaysAvailable:
Expand Down
80 changes: 4 additions & 76 deletions docs/api/rest_api/rest_api_reference/rest_api_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -131617,34 +131617,6 @@ <h6 class="heading text-gray border-bottom pb-2">Types</h6>
Representation of date range.</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="datetime" tabindex="-1" role="dialog" aria-labelledby="datetimeTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title" id="datetimeTitle">datetime</p>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<span class="font-weight-medium">datetime</span>

<span class="red-text">*</span>

(<span class="font-italic">object</span>)
-
<span>
Representation of date and time.</span>


<div class="items">
<ul class="browser-default">
</ul>
Expand Down Expand Up @@ -139910,16 +139882,12 @@ <h6 class="heading text-gray border-bottom pb-2">Types</h6>

<span class="red-text">*</span>

(<span class="font-italic">DateTime</span>)
(<span class="font-italic">datetime</span>)
-
<span>
</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -140100,16 +140068,12 @@ <h6 class="heading text-gray border-bottom pb-2">Types</h6>

<span class="red-text">*</span>

(<span class="font-italic">DateTime</span>)
(<span class="font-italic">datetime</span>)
-
<span>
</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -146974,34 +146938,6 @@ <h6 class="heading text-gray border-bottom pb-2">Types</h6>

</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="DateTime" tabindex="-1" role="dialog" aria-labelledby="DateTimeTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title" id="DateTimeTitle">DateTime</p>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<span class="font-weight-medium">DateTime</span>

<span class="red-text">*</span>

(<span class="font-italic">object</span>)
-
<span>
https://www.php.net/manual/en/class.datetime.php</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</div>
</div>
Expand Down Expand Up @@ -147146,32 +147082,24 @@ <h6 class="heading text-gray border-bottom pb-2">Types</h6>

<span class="red-text">*</span>

(<span class="font-italic">DateTime</span>)
(<span class="font-italic">datetime</span>)
-
<span>
</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</li>
<li>
<span class="font-weight-medium">modificationDate</span>

<span class="red-text">*</span>

(<span class="font-italic">DateTime</span>)
(<span class="font-italic">datetime</span>)
-
<span>
</span>


<div class="items">
<ul class="browser-default">
</ul>
</div>
</li>
<li>
<span class="font-weight-medium">mainLanguageCode</span>
Expand Down

0 comments on commit 8fb6bc9

Please sign in to comment.