Skip to content

airframe-http: Validation for unnecessary attributes #978

@xerial

Description

@xerial

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions