laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

Can't access old service with new version #39

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

I had version (1) with service: /api/notification Created new version (2) with new service: /api/reset-bagde

Default version is 1.

In version 2 I changed /api/notification logic, only for version 2. /api/notification was copied in V2 folder and I changed it, but the problem is I can't access v2/api/notification :(

response is: { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Page not found." }

Can someone explain me, why? and is the problem in version of apigility?
"zfcampus/zf-apigility": "1.0.2"

by this video this should work: https://youtu.be/D_mcntk4tXI?t=1241


Originally posted by @zbintiosul at https://github.com/zfcampus/zf-apigility/issues/147

michalbundyra commented 4 years ago

Problem is in module.config.php, no configs for V2. I created a new config V2.module.config.php and I added Code, from module.config.php and replaced \V1\ with \V2. Also I merged both configs in module.php: module.php.

And now is working and v1 and v2 with services from version 1.


Originally posted by @zbintiosul at https://github.com/zfcampus/zf-apigility/issues/147#issuecomment-172573264