-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4] webservices consistency #34093
[4] webservices consistency #34093
Conversation
@alikon I think you will have to adapt the API tests to that because they are failing in Drone: https://ci.joomla.org/joomla/joomla-cms/44217/1/25 |
@alikon A quick search for |
@alikon And looking for
|
thanks @richard67 one of these day maybe i'll need to set codeception 😃 |
There is nothing more reliable than a search on command line. On Linux: On Windows: |
@alikon I was just reading the docs https://docs.joomla.org/J4.x:Joomla_Core_APIs to see what needs to be changed, and I saw that there is still singular used for "Contact": Is the docs outdated? If not, then this should be changed, too, for consistency. |
@alikon Beside the contacts, that doc shows 3 more where singular is used:
|
if we will get green light on this....i'll do the other changes...i don't want to spend time on endless discussions |
@wilsonge Do you want that to be done, what this PR here does plus my findings above, before RC? |
If this is accepted, we should do the same for contact (which is using singular at the moment). Also, maybe a stupid question: Why do we need |
@joomdonation If you scroll a little bit up you will find 1 comment by me listing more than not just contact being singular: #34093 (comment) , just below my comment where I already reported that for contact. |
Ah Yes @richard67. See it now ! |
Happy to move to plural. As I said in the issue the only thing is that the “type” property in the API body (contentType property in the view) must be singular (by the json api standard) |
@alikon Can this be tested now? |
yes only for |
I'll wait until the others are implemented as well then. |
com_contact, com_privacy, com_redirect covered now |
I made a start by testing the |
good catch 👍 probably already there ... |
Do you mean the PATCH test? I checked it and the reason it passes is because the request data of the test includes the |
yes |
you can delete an article only if it is in trashed status (-2) for reference see: |
I very much agree with your reservations in #31130 about having to make 2 requests in order to delete an item. I have the distinct feeling a lot of effort has been put into using as much existing code as possible while implementing the web services. Although I am very much in favor of code reuse, I also think there are important differences between the regular front end services and the web services. This issue is an example of that, as well as the I also think a 500 is not the proper response code for the failure of such an action. Maybe 409 is more appropriate? Anyway, I executed the |
I tested the
Some responses do not comply with the JSON:API specifications. From what I have seen, |
Thanks. @pjdevries can you open an issue for the content history endpoints. If it's broken it needs fixing and risks getting lost now this is merged. |
See #34361 |
Pull Request for discussion #34080 (comment)
Summary of Changes
so
v1/content/article
becamev1/content/articles
v1/content/article/contenthistory/
becamev1/content/articles/contenthistory/
v1/content/article/contenthistory/keep
becamev1/content/articles/contenthistory/keep
v1/contact/form/:id
becamev1/contacts/form/:id
v1/contact
becamev1/contacts
v1/contact/categories
becamev1/contacts/categories
v1/fields/contact/contact
becamev1/fields/contacts/contact
v1/fields/contact/mail
becamev1/fields/contacts/mail
v1/fields/groups/contact/contact
becamev1/fields/groups/contacts/contact
v1/fields/groups/contact/mail
becamev1/fields/groups/contacts/mail
v1/fields/groups/contact/categories
becamev1/fields/groups/contacts/categories
v1/contact/contenthistory/:id
becamev1/contacts/contenthistory/:id
v1/contact/contenthistory/keep/:id
becamev1/contacts/contenthistory/keep/:id
v1/redirect
becamev1/redirects
v1/privacy/request
becamev1/privacy/requests
v1/privacy/request/export/:id
becamev1/privacy/requests/export/:id
v1/privacy/consent
becamev1/privacy/consents
Testing Instructions
call the all the above endpoints
Documentation Changes Required
yes