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

        

Reply via email to