airframe icon indicating copy to clipboard operation
airframe copied to clipboard

airframe-http: Validation for unnecessary attributes

Open xerial opened this issue 4 years ago • 0 comments

model class

case class OpsRequest(@required command:String, repeat:Boolean = false)
{ 
  "command":"run", 
  "repet": true 
}

^ It misspells an input parameter name

// This request will be passed to the server by ignoring "repet" input parameter:
OpsRequest(command = "run", repeat= false) 

In general, it should return 400 to avoid such a programming error.

xerial avatar Mar 12 '20 06:03 xerial