eeditiones / roaster

Open API Router for eXist
GNU General Public License v3.0
23 stars 8 forks source link

Pass all received properties to route handler #57

Closed line-o closed 2 years ago

line-o commented 2 years ago

Regardless of the properties-property that might be present in the schema for an encoding in requestBody, all properties must be passed to the route handler function.

Relevant spec The properties is not mandatory and additionalProperties, which handles not explicitly listed properties defaults to true.

At the moment Roaster will only pass properties to the route handler that are explicitly listed as if additionalProperties was set to false. This is true for form-data and needs to be checked for other encodings as well.

Example requestBody definition:

{
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object"
        }
      },
      "application/x-www-form-urlencoded":{
        "schema": {
          "type": "object"
        }
      },
      "multipart/form-data":{
        "schema": {
          "type": "object"
        }
      }
    }
  }
github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.7.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: