-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm trying to get a command to run a 'cpp_validator_func'. Similar to SERVER-73492, 'commands' doesn't recognize 'cpp_validator_func'
text_search_index_commands.idl: (110, 8): ID0008: Unknown IDL node 'cpp_validator_func' for YAML entity 'command'
So I tried using the 'chained_structs' field to link in a 'structs' type that does accept 'cpp_validator_func'. But while using 'chained_structs' in the command and 'cpp_validator_func' in the struct compiles, the validator function doesn't get run.
For example, I want to convert this IDL command that doesn't accept 'cpp_validator_func'
commands: updateSearchIndex: description: "Command to update a search index." command_name: updateSearchIndex namespace: concatenate_with_db cpp_name: UpdateSearchIndexCommand strict: true reply_type: UpdateSearchIndexReply fields: name: description: "The name of the index to be updated" type: string optional: true stability: stable api_version: ""
Into a command + struct w/ validator like this:
structs: UpdateSearchIndexRequest: description: "todo" strict: true cpp_validator_func: "validateUpdateSearchIndexRequest" fields: name: description: "The name of the index to be updated" type: string optional: true stability: stable commands: updateSearchIndex: description: "Command to update a search index." command_name: updateSearchIndex namespace: concatenate_with_db cpp_name: UpdateSearchIndexCommand strict: true reply_type: UpdateSearchIndexReply inline_chained_structs: true chained_structs: UpdateSearchIndexRequest: UpdateSearchIndexRequest api_version: ""
- related to
-
SERVER-73492 Support IDL 'type' under 'server_parameters'
-
- Open
-