Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL templates were ignored in Action section? #147

Open
snakevil opened this issue Dec 6, 2016 · 1 comment
Open

URL templates were ignored in Action section? #147

snakevil opened this issue Dec 6, 2016 · 1 comment

Comments

@snakevil
Copy link

snakevil commented Dec 6, 2016

In some project, URL templates were used for some reason in Action sections.

However, those APIs were always responded with 'Cannot GET/POST ...' while mocking.

How to fix that? Thanks.

@alex-pex
Copy link

I may have the same problem. I tried to specify an action using a header and a combination of an HTTP method and URI Template, but it isn't understood by Drakov.

## Invoice [/{clientToken}/invoices/{invoiceId}]
...

### Get printable invoice [GET /{clientToken}/invoices/{invoiceId}/print]
...

I get [LOG] Setup Route: GET /:clientToken/invoices/:invoiceId Get printable invoice (notice that /print is missing in the url).

With the following doc:

## Invoice [/{clientToken}/invoices/{invoiceId}]
...

## /{clientToken}/invoices/{invoiceId}/print
### Get printable invoice [GET]
...

I get the expected result [LOG] Setup Route: GET /:clientToken/invoices/:invoiceId/print Get printable invoice.

The API Blueprint allows both notations, but Drakov don't. I could use the 2nd solution but Aglio doesn't produce the same rendering: it adds an extra doc section.

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

No branches or pull requests

2 participants