Problem
In v0.2.0, generated bindingJSON uses json.Unmarshal. Unknown fields are silently ignored, and malformed JSON is converted to a fixed adapter-level 400 before the service implementation runs.
That prevents an endpoint implementation from enforcing GitHub-specific request validation. For example, the installation-token endpoint needs to reject an unknown permission key and the validated contract returns 422 for malformed request bodies. Once the adapter has decoded *github.InstallationTokenOptions, the implementation can no longer distinguish an empty permissions object from one containing only unknown keys.
Requested behavior
Provide either:
- a server option for strict decoding plus configurable binding-error mapping, or
- a raw-body/decoder hook that lets the application own endpoint-specific validation before typed binding.
The default may remain permissive for compatibility. Add tests for unknown fields and malformed/multiple JSON values.
Problem
In v0.2.0, generated
bindingJSONusesjson.Unmarshal. Unknown fields are silently ignored, and malformed JSON is converted to a fixed adapter-level 400 before the service implementation runs.That prevents an endpoint implementation from enforcing GitHub-specific request validation. For example, the installation-token endpoint needs to reject an unknown permission key and the validated contract returns 422 for malformed request bodies. Once the adapter has decoded
*github.InstallationTokenOptions, the implementation can no longer distinguish an empty permissions object from one containing only unknown keys.Requested behavior
Provide either:
The default may remain permissive for compatibility. Add tests for unknown fields and malformed/multiple JSON values.