-
Notifications
You must be signed in to change notification settings - Fork 64
Updated Apigility Admin to allow setting of the default API version #27
Updated Apigility Admin to allow setting of the default API version #27
Conversation
$config = $this->configResource->fetch(true); | ||
|
||
return isset($config['zf-versioning']['default-version']) && | ||
$config['zf-versioning']['default-version'] === $defaultVersion; |
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.
Move the &&
to the next line.
@michaelmoussa I just tried to merge locally so I could test, but it appears that the Thanks! |
Also added ModuleEntityTest, which was missing.
It should be fine now. I did my best to make sure I didn't break anything, but the branch/PR was pretty old so I may have overlooked something. Specifically, I:
Default Version is preserved on reload, and changing Current Version shows me the listing of Rest Services. Apologies in advance if I goofed somewhere (I re-read the PR diff in the conflicted files and it seems OK, though). Feel free to make any trivial changes if necessary to accept the PR, or let me know if there's anything major you'd prefer I address. |
@michaelmoussa I'd like to do the following:
I'm going to move forward with this and then finish merging. |
Sounds good. Thanks! |
|
||
$this->configResource->patch(array( | ||
'zf-versioning' => array( | ||
'default-version' => $defaultVersion |
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.
This key should be underscore separated, not dash (we use dash-separated for top-level keys representing modules, but underscore-separated for the options beneath them).
I'll modify this on merge.
Updated Apigility Admin to allow setting of the default API version
Merged! @michaelmoussa Where's the PR against develop to fix the config writer? I'd like to take care of that today, too. :) |
Ooh, two in one day! :-) Here you go: zendframework/zendframework#5569 |
Add "zfcampus/zf-configuration" dependency
- zf-configuration is only used by the admin
- only used by the admin; moved to development config
See zf-versioning:PR #1
Thoughts @weierophinney? My only concern is that there is no visible confirmation that the default version has been changed once the user changes the SELECT option. Perhaps a
confirm("Are you sure you want to change the default API version?");
(or something prettier)?On the other hand, they'll see it in the
git diff
for their module before committing the changes, so the lack of a visual confirmation right now isn't the end of the world.NOTE: This assertion will fail until this PR is merged. I inadvertently introduced a BC break with the readable PhpArray config writer change. :/