You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/19 12:17:12 UTC

[GitHub] [apisix] juzhiyuan opened a new issue #2087: request help: Update plugin's schema response-rewrite

juzhiyuan opened a new issue #2087:
URL: https://github.com/apache/apisix/issues/2087


   refer to https://github.com/apache/apisix/issues/2082#issue-681772868
   
   ## Currently
   ```json
   {
       "minProperties":1,
       "properties":{
           "body":{
               "description":"new body for repsonse",
               "type":"string"
           },
           "body_base64":{
               "default":false,
               "description":"whether new body for repsonse need base64 decode before return",
               "type":"boolean"
           },
           "headers":{
               "description":"new headers for repsonse",
               "minProperties":1,
               "type":"object"
           },
           "status_code":{
               "description":"new status code for repsonse",
               "maximum":598,
               "minimum":200,
               "type":"integer"
           }
       },
       "type":"object"
   }
   ```
   
   ## Expected
   [Playground](https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6eyJib2R5X2Jhc2U2NCI6ZmFsc2UsInJlamVjdGVkX2NvZGUiOjUwMywiY3VycmVudENvbG9yIjoiIzAwZmYwMCIsImNvbG9yTWFzayI6WyIjMDAwMGZmIl0sImNvbG9yUGFsZXR0ZSI6WyIjZmYwMDAwIl0sImJsZW5kTW9kZSI6InNjcmVlbiJ9LCJzY2hlbWEiOnsibWluUHJvcGVydGllcyI6MSwicHJvcGVydGllcyI6eyJib2R5Ijp7ImRlc2NyaXB0aW9uIjoibmV3IGJvZHkgZm9yIHJlcHNvbnNlIiwidHlwZSI6InN0cmluZyJ9LCJib2R5X2Jhc2U2NCI6eyJkZWZhdWx0IjpmYWxzZSwiZGVzY3JpcHRpb24iOiJ3aGV0aGVyIG5ldyBib2R5IGZvciByZXBzb25zZSBuZWVkIGJhc2U2NCBkZWNvZGUgYmVmb3JlIHJldHVybiIsInR5cGUiOiJib29sZWFuIn0sImhlYWRlcnMiOnsiZGVzY3JpcHRpb24iOiJuZXcgaGVhZGVycyBmb3IgcmVwc29uc2UiLCJtaW5Qcm9wZXJ0aWVzIjoxLCJ0eXBlIjoiYXJyYXkiLCJpdGVtcyI6eyJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJrZXkiOnsidHlwZSI6InN0cmluZyJ9LCJ2YWx1ZSI6eyJ0eXBlIjoic3RyaW5nIn19fX0sInN0YXR1c19jb2RlIjp7ImRlc2NyaXB0aW9uIjoibmV3IHN0YXR1cyBjb2RlIGZvciByZXBzb25zZSIsIm1heGltdW0iOjU5OCwibWluaW11bSI6MjAwLCJ0eXBlIjoiaW50ZWdlciJ9fSwidHlwZSI6Im9iamVjdCJ9LCJ1aVNjaGVtYSI6eyJ
 ibGVuZE1vZGUiOnsidWk6ZW51bURpc2FibGVkIjpbIm11bHRpcGx5Il19LCJ0b2dnbGVNYXNrIjp7InVpOndpZGdldCI6InJhZGlvIn19LCJ0aGVtZSI6ImRlZmF1bHQiLCJsaXZlU2V0dGluZ3MiOnsidmFsaWRhdGUiOmZhbHNlLCJkaXNhYmxlIjpmYWxzZSwib21pdEV4dHJhRGF0YSI6ZmFsc2UsImxpdmVPbWl0IjpmYWxzZX19)
   
   ```json
   {
     "minProperties": 1,
     "properties": {
       "body": {
         "description": "new body for repsonse",
         "type": "string"
       },
       "body_base64": {
         "default": false,
         "description": "whether new body for repsonse need base64 decode before return",
         "type": "boolean"
       },
       "headers": {
         "description": "new headers for repsonse",
         "minProperties": 1,
         "type": "array",
         "items": {
           "type": "object",
           "properties": {
             "key": {
               "type": "string"
             }, "value": {
               "type": "string"
             }
           }
         }
       },
       "status_code": {
         "description": "new status code for repsonse",
         "maximum": 598,
         "minimum": 200,
         "type": "integer"
       }
     },
     "type": "object"
   }
   ```
   
   ## Notes
   1. This issue will be fixed on the Frontend's side: convert the headers from KV Object to Array;
   2. All Body filed should use Textarea instead of Normal Input.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] liuxiran commented on issue #2087: request help: Update plugin's schema response-rewrite

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #2087:
URL: https://github.com/apache/apisix/issues/2087#issuecomment-716492170


   this issue would be fixed in the same way  with  https://github.com/apache/apisix/issues/2082#issuecomment-716356064


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] juzhiyuan closed issue #2087: request help: Update plugin's schema response-rewrite

Posted by GitBox <gi...@apache.org>.
juzhiyuan closed issue #2087:
URL: https://github.com/apache/apisix/issues/2087


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org