-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
EZP-29234: As a developer, I want to read about customizing REST API response #2434
EZP-29234: As a developer, I want to read about customizing REST API response #2434
Conversation
Lack of changes in |
* | ||
* @return string | ||
*/ | ||
protected function generateMediaType($name, $type) | ||
protected function generateMediaType($name, $type, $vendor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides failure , optionally add a default value here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value added.
ebea5e5
to
e179b73
Compare
Last failure: I guess this will be fixed in the PR you propose there. To unblock, one (A) option is to do a quick unblock PR to Platform UI where we just add the parameter, given it is optional PHP should be ok with it both for version prior to this, and with this PR. Then once tests are green we can merge this and do followup on Platform UI where we bump requirements on kernel to be able to get changes in this PR. The other (B) option is Hulk smash approach, merge while both PR's are read as we know it's a two way dependency issue. |
@andrerom in PlatformUI composer.json I set the dependency to this branch for kernel in order to get tests green ezsystems/PlatformUIBundle@d184009#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780L14. Apparently, on 1.13 there is one test which always fails and it is not relevant to my changes. Probably it could be merged, but without this dependency in composer.json. After that, kernel should be unblocked. |
I can only add from myself, that I also had this on mind, yet decided to go this way, because we introduce the possibility to customize a response in a cookbook as something new. Hopefully, no one used this approach before. :) Otherwise, I guess I should think of something else, yet feedback will be welcomed. |
Based on the code and code alone, there's no BC break, because there's no BC policy on Core namespace. But given we're using it in PlatformUI... well... :) Using it is rather a bug in PlatformUI and a bug in our doc to even recommend that :P BTW. What is the new usage, with this change? In the linked doc PR I see only old usage by extending. Once again, everything that we intend for Developers to use should belong to some API namespace. If it's meant for extending - then for SPI, but we haven't really documented or promised anything on that. Unfortunately if we documented something, then despite what I've said above it should be considered as a BC break. But maybe not that severe, AFAICS doc change was merged 7 days ago. So there is still some time slot to fix that :) |
true, lets do this, greatly simplifies usage. |
@konradoboza lets just unblock this, please do the following:
This afaik will allow kernel to pass easily, and ui PR will pass once kernel change has been merged. |
Suggestions applied, thank you @andrerom. There are no changes in PlatformUI PR, so I think once this is merged, we are good and safe to re-run tests in PlatformUI, as Travis is green here. :) |
@adamwojs as you are on reviewers list also, is this ok from your side? |
6.13
This PR contains improvement for customizing REST
Accept
header based response. The idea is to ged rid of overriden format generators which only responsibility is to set$vendor
prefix which could be defined as an argument inservices.yml
. It will simplify customization of API response which was introduced in: ezsystems/PlatformUIBundle#964 and described in cookbook: ibexa/documentation-developer#288. As a followup, this configuration could be applied toPlatformUiBundle
.TODO:
$ composer fix-cs
).