Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix REST datetime usage #2420

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Fix REST datetime usage #2420

merged 2 commits into from
Jul 2, 2024

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Jul 1, 2024

Question Answer
JIRA Ticket N/A
Versions master , 4.6
Edition All
  • DateTime is a PHP class not used as-is in REST.
  • datetime is native and need no definition.

About the chosen type:
https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/#date
As those datetime properties are passed to DateTime::__construct, time zones are accepted.

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

`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"
@adriendupuis adriendupuis marked this pull request as ready for review July 2, 2024 07:18
@adriendupuis adriendupuis merged commit fc54a1d into master Jul 2, 2024
4 checks passed
@adriendupuis adriendupuis deleted the fix-rest-datetime branch July 2, 2024 07:33
adriendupuis added a commit that referenced this pull request Jul 2, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants