Closed michaelmoussa closed 10 years ago
@michaelmoussa Can you also do a similar PR against zfcampus/zf-apigility-admin for setting a default per-API?
@weierophinney Sure.
Is there anything else needed for this particular PR against zf-versioning
so I can tackle that too? I started the zf-apigility-admin
work already and so far haven't seen any updates that I would need to make to this PR.
@weierophinney WIP for zf-apigility-admin
here if you're interested and want to comment.
It updates the configuration file already and everything. I just need to have the new default version value persist on the admin frontend between refreshes. That information is not presently available in the /admin/api/module
response.
Looking good -- can you rebase your zf-apigility-admin
changes against most recent master, please, and then submit a PR for it? I'll go ahead and merge this one, with the changes I suggested, in the meantime.
Sure. Will take care of it late next week. Thanks for the merge.
This change allows the API developer to choose which version should act as the default if none is specified in the URL or headers.
This is accomplished by setting
[zf-versioning][default-version]
inmodule.config.php
(which defaults to1
). If this setting is omitted, then the existing default value of1
in thePrototypeRouteListener
will be used.I modified the
dataProvider
in the test class to provide an optional$apiVersion
to allow for testing various possibilities, such as:1
1
"1
as is done presently)