couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Motovilov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COUCHDB-1480) Rewrite handler does not substitute patterns in nested arrays
Date Wed, 16 May 2012 15:53:02 GMT

     [ 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

        

Mime
View raw message