You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #48 provides the exact type: Presenter form using Grape’s existing custom-type .parse contract on an application input decorator. The method validates the incoming object and required fields, parses only writable properties, and returns the decorator so Grape’s type check succeeds. Access .represented for the domain model.
The README example is executed by actual JSON request specs, covering valid coercion, undeclared properties, malformed/incomplete input, blank titles, and missing parameters. Invalid input returns 400 before model construction. Serialization properties and Swagger metadata do not automatically supply request validation or a model constructor.
Implemented and merged in #48. The README now demonstrates type: ParameterProductRepresenter using an application-specific input decorator with Grape’s existing .parse contract.
Validate the incoming object and required fields explicitly, parse only writable properties, and return the decorator instance so Grape’s type check succeeds. from_hash itself returns the model, so return the decorator explicitly and use .represented to access the model afterward. Invalid input produces HTTP 400; response serialization metadata does not implicitly define input validation or persistence.
Activity
dblock commentedon Oct 27, 2026
PR #48 provides the exact
type: Presenterform using Grape’s existing custom-type.parsecontract on an application input decorator. The method validates the incoming object and required fields, parses only writable properties, and returns the decorator so Grape’s type check succeeds. Access.representedfor the domain model.The README example is executed by actual JSON request specs, covering valid coercion, undeclared properties, malformed/incomplete input, blank titles, and missing parameters. Invalid input returns 400 before model construction. Serialization properties and Swagger metadata do not automatically supply request validation or a model constructor.
Posted by Copilot, an AI, on behalf of @dblock.
dblock commentedon Oct 27, 2026
Implemented and merged in #48. The README now demonstrates
type: ParameterProductRepresenterusing an application-specific input decorator with Grape’s existing.parsecontract.Validate the incoming object and required fields explicitly, parse only writable properties, and return the decorator instance so Grape’s type check succeeds.
from_hashitself returns the model, so return the decorator explicitly and use.representedto access the model afterward. Invalid input produces HTTP 400; response serialization metadata does not implicitly define input validation or persistence.See Presenter Parameter Types.
Posted by Copilot, an AI, on behalf of @dblock.