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

Global Apigility API URL prefix #67

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

I've been thinking it would be nice to have global setting to prefix all API's build using Apigility. This would make Apigility modules being more portable between projects - e.g. when you deploy Apigility server on it's own (e.g. APIs are available under api.example.com) or you use Apigility modules within another application (example.com/api).

This could be done by injecting Api related routes into general application router. Currently we create routes under 'router'->'routes' config. My quick suggestion would be to move this into 'api-router'->'routes' or just 'api-routes' config array.

What do you think?


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

michalbundyra commented 4 years ago

This, as well as API-specific route prefixes, are something I would like to provide in future versions. We can likely handle them similarly to how we handle URI versioning (i.e., a listener that injects the prefix into configured routes).

Marking as an enhancement request.


Originally posted by @weierophinney at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-49092820

michalbundyra commented 4 years ago

Matthew,

Remember this issues I’ve had with such configuration a couple of months ago. Changes would have to be made into the ZF2 router, besides injections through listeners. But the need is effective.

Julien.

Le 15 juil. 2014 à 23:08, weierophinney notifications@github.com a écrit :

This, as well as API-specific route prefixes, are something I would like to provide in future versions. We can likely handle them similarly to how we handle URI versioning (i.e., a listener that injects the prefix into configured routes).

Marking as an enhancement request.

— Reply to this email directly or view it on GitHub.


Originally posted by @jguittard at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-49093223

michalbundyra commented 4 years ago

@weierophinney We need this feature in own project. I will be working on this on the next week, so I can create a merge request for this. I need only your advice where I should start


Originally posted by @snapshotpl at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-66786011

michalbundyra commented 4 years ago

@snapshotpl you've done something? some example? i need the same thing..


Originally posted by @stefanorg at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-68598465

michalbundyra commented 4 years ago

Yes. I will show something in next week. 3 sty 2015 16:35 "stefanorg" notifications@github.com napisał(a):

@snapshotpl https://github.com/snapshotpl you've done something? some example? i need the same thing..

— Reply to this email directly or view it on GitHub https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-68598465 .


Originally posted by @snapshotpl at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-68605834

michalbundyra commented 4 years ago

perfect i'll wait for you :+1:


Originally posted by @stefanorg at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-68614569

michalbundyra commented 4 years ago

@snapshotpl did you have any update?


Originally posted by @stefanorg at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-69565068

michalbundyra commented 4 years ago

@stefanorg Tomorrow. @weierophinney when you plan to release 1.1?


Originally posted by @snapshotpl at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-93568760

michalbundyra commented 4 years ago

@snapshotpl any news about this? i'm really interested in this feature


Originally posted by @ildanno at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-95519755

michalbundyra commented 4 years ago

any news on this feature?


Originally posted by @remizyaka at https://github.com/zfcampus/zf-apigility/issues/51#issuecomment-146650570