Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Add support for multiple URL params #17

Open
stringerbell opened this issue Feb 16, 2016 · 1 comment
Open

Add support for multiple URL params #17

stringerbell opened this issue Feb 16, 2016 · 1 comment

Comments

@stringerbell
Copy link

Currently, only optional params are exposed when looking at a service.

Example:

screen shot 2016-02-16 at 11 44 48 am

It'd be awesome to add support for non-optional params

Example:

screen shot 2016-02-16 at 11 43 59 am

In Service.php, in the toArray() method, this is happening:

$routeWithReplacements = str_replace(['[', ']', '{/', '{:'], ['{', '}', '/{', '{'], $service->route);

Changing it to:

$routeWithReplacements = preg_replace('#\[?\/:(\w+)\]?#', '/{$1}', $service->route);

will give the results I'd like to see.

If this change is acceptable, I can go ahead and make a PR, otherwise, I'm open to hearing other ideas to add support for this.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-documentation-swagger; a new issue has been opened at laminas-api-tools/api-tools-documentation-swagger#10.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants