You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Max Motovilov (JIRA)" <ji...@apache.org> on 2012/05/16 17:51:03 UTC
[jira] [Created] (COUCHDB-1480) Rewrite handler does not substitute
patterns in nested arrays
Max Motovilov created COUCHDB-1480:
--------------------------------------
Summary: Rewrite handler does not substitute patterns in nested arrays
Key: COUCHDB-1480
URL: https://issues.apache.org/jira/browse/COUCHDB-1480
Project: CouchDB
Issue Type: Bug
Affects Versions: 1.2
Reporter: Max Motovilov
This works:
{code}
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"key": [ ":agency", ":country" ]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
{code}
This doesn't -- {{:agency}} and {{:country}} are not substituted in the resulting URL
{code}
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"keys": [
[ ":agency", ":country" ],
[ ":agency" ],
[ ":country" ]
]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1480) Rewrite handler does not substitute
patterns in nested arrays
Posted by "Max Motovilov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Motovilov updated COUCHDB-1480:
-----------------------------------
Description:
This works:
```
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"key": [ ":agency", ":country" ]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
```
This doesn't -- ```:agency``` and ```:country``` are not substituted in the resulting URL
```
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"keys": [
[ ":agency", ":country" ],
[ ":agency" ],
[ ":country" ]
]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
```
was:
This works:
{code}
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"key": [ ":agency", ":country" ]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
{code}
This doesn't -- {{:agency}} and {{:country}} are not substituted in the resulting URL
{code}
"rewrites": [
{
"from": "/byagencyandcountry/:agency/:country",
"to": "_list/byagencyandcountry/search",
"query": {
"keys": [
[ ":agency", ":country" ],
[ ":agency" ],
[ ":country" ]
]
},
"formats": {
"agency": "int",
"country": "string"
}
}
],
{code}
> Rewrite handler does not substitute patterns in nested arrays
> -------------------------------------------------------------
>
> Key: COUCHDB-1480
> URL: https://issues.apache.org/jira/browse/COUCHDB-1480
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Max Motovilov
>
> This works:
> ```
> "rewrites": [
> {
> "from": "/byagencyandcountry/:agency/:country",
> "to": "_list/byagencyandcountry/search",
> "query": {
> "key": [ ":agency", ":country" ]
> },
> "formats": {
> "agency": "int",
> "country": "string"
> }
> }
> ],
> ```
> This doesn't -- ```:agency``` and ```:country``` are not substituted in the resulting URL
> ```
> "rewrites": [
> {
> "from": "/byagencyandcountry/:agency/:country",
> "to": "_list/byagencyandcountry/search",
> "query": {
> "keys": [
> [ ":agency", ":country" ],
> [ ":agency" ],
> [ ":country" ]
> ]
> },
> "formats": {
> "agency": "int",
> "country": "string"
> }
> }
> ],
> ```
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira