@@ -2815,13 +2815,13 @@ public DetailedResponse<QueryNoticesResponse> FederatedQueryNotices(string envir
28152815 /// </summary>
28162816 /// <param name="environmentId">The ID of the environment.</param>
28172817 /// <param name="collectionId">The ID of the collection.</param>
2818+ /// <param name="prefix">The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete
2819+ /// to `Hot`, `Housing`, or `How do I upgrade`. Possible completions are.</param>
28182820 /// <param name="field">The field in the result documents that autocompletion suggestions are identified from.
28192821 /// (optional)</param>
2820- /// <param name="prefix">The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete
2821- /// to `Hot`, `Housing`, or `How do I upgrade`. Possible completions are. (optional)</param>
28222822 /// <param name="count">The number of autocompletion suggestions to return. (optional)</param>
28232823 /// <returns><see cref="Completions" />Completions</returns>
2824- public DetailedResponse < Completions > GetAutocompletion ( string environmentId , string collectionId , string field = null , string prefix = null , long ? count = null )
2824+ public DetailedResponse < Completions > GetAutocompletion ( string environmentId , string collectionId , string prefix , string field = null , long ? count = null )
28252825 {
28262826 if ( string . IsNullOrEmpty ( environmentId ) )
28272827 {
@@ -2839,6 +2839,10 @@ public DetailedResponse<Completions> GetAutocompletion(string environmentId, str
28392839 {
28402840 collectionId = Uri . EscapeDataString ( collectionId ) ;
28412841 }
2842+ if ( string . IsNullOrEmpty ( prefix ) )
2843+ {
2844+ throw new ArgumentNullException ( "`prefix` is required for `GetAutocompletion`" ) ;
2845+ }
28422846
28432847 if ( string . IsNullOrEmpty ( VersionDate ) )
28442848 {
@@ -2856,14 +2860,14 @@ public DetailedResponse<Completions> GetAutocompletion(string environmentId, str
28562860
28572861 restRequest . WithArgument ( "version" , VersionDate ) ;
28582862 restRequest . WithHeader ( "Accept" , "application/json" ) ;
2859- if ( ! string . IsNullOrEmpty ( field ) )
2860- {
2861- restRequest . WithArgument ( "field" , field ) ;
2862- }
28632863 if ( ! string . IsNullOrEmpty ( prefix ) )
28642864 {
28652865 restRequest . WithArgument ( "prefix" , prefix ) ;
28662866 }
2867+ if ( ! string . IsNullOrEmpty ( field ) )
2868+ {
2869+ restRequest . WithArgument ( "field" , field ) ;
2870+ }
28672871 if ( count != null )
28682872 {
28692873 restRequest . WithArgument ( "count" , count ) ;
0 commit comments