s12d/server/api.yaml [168:190]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        passthroughBehavior: "when_no_templates"
        responses:
          "200":
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Origin: {"Fn::If": ["IsLocal", "'*'", {"Fn::Sub":["'https://${appDomain}'", {"appDomain": { "Ref" : "CustomDomain" }}]}]}
            responseTemplates:
              application/json: "#set($inputRoot = $input.path('$')) \
                {\"id\":\"$inputRoot.Attributes.id.S\", \
                \"url\":\"$inputRoot.Attributes.url.S\",
                \"timestamp\":\"$inputRoot.Attributes.timestamp.S\", \
                \"owner\":\"$inputRoot.Attributes.owner.S\", \
                \"clicks\":\"$inputRoot.Attributes.clicks.N\", \
                \"regions\": {
                  #foreach($region in $inputRoot.regions.M.keySet()) \
                  #set($reach = $input.json(\"$.regions.M['$region'].N\")) \
                    \"$region\":$reach#if($foreach.hasNext),#end \
                  #end} \
                }"
          "400":
            statusCode: "400"
            responseParameters:
              method.response.header.Access-Control-Allow-Origin: {"Fn::If": ["IsLocal", "'*'", {"Fn::Sub":["'https://${appDomain}'", {"appDomain": { "Ref" : "CustomDomain" }}]}]}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



s12d/server/api.yaml [311:333]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        passthroughBehavior: "when_no_templates"
        responses:
          "200":
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Origin: {"Fn::If": ["IsLocal", "'*'", {"Fn::Sub":["'https://${appDomain}'", {"appDomain": { "Ref" : "CustomDomain" }}]}]}
            responseTemplates:
              application/json: "#set($inputRoot = $input.path('$')) \
                {\"id\":\"$inputRoot.Attributes.id.S\", \
                \"url\":\"$inputRoot.Attributes.url.S\",
                \"timestamp\":\"$inputRoot.Attributes.timestamp.S\", \
                \"owner\":\"$inputRoot.Attributes.owner.S\", \
                \"clicks\":\"$inputRoot.Attributes.clicks.N\", \
                \"regions\": {
                  #foreach($region in $inputRoot.regions.M.keySet()) \
                  #set($reach = $input.json(\"$.regions.M['$region'].N\")) \
                    \"$region\":$reach#if($foreach.hasNext),#end \
                  #end} \
                }"
          "400":
            statusCode: "400"
            responseParameters:
              method.response.header.Access-Control-Allow-Origin: {"Fn::If": ["IsLocal", "'*'", {"Fn::Sub":["'https://${appDomain}'", {"appDomain": { "Ref" : "CustomDomain" }}]}]}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



