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:
[email protected]


Reply via email to