A validate-only field lets an API caller preview whether an unsafe request would succeed without applying its requested operation. Set the optional Boolean to true; otherwise the method behaves normally. section 27.0 section 27.3
Design validation requests to provide a useful, safe preview:
- Validate as many request aspects as possible, including authorization, referential integrity, parameter formats, and relevant external services, without modifying data. section 27.3 section 27.6
- Return errors as the real request would, such as 403 Forbidden, and populate response fields whenever they can be determined. section 27.3
- Default validateOnly to false so ordinary requests continue to execute without requiring an extra flag. section 27.3
- Use a safer opt-in design for catastrophic operations when omission could destroy data; a force field can require explicit execution and provide a preview otherwise. section 19.3.2
Creating a chat room
A create request can expose validation explicitly: CreateChatRoom({ resource: chatRoom, validateOnly: true }). The call checks whether creation would succeed while keeping the operation safe and idempotent; a normal request omits the field or leaves it false. section 27.3.3 section 27.3
Validation may still contact authorization, integrity, or other internal components while avoiding data modification. section 27.3
