@@ -59,16 +59,20 @@ public static CsharpMethod Clone(CsharpMethod method)
5959 } ;
6060 }
6161
62- private bool IsPartless => this . Url . Parts == null || ! this . Url . Parts . Any ( ) ;
63-
6462 private string MetricPrefix => this . RequestType . Replace ( "Request" , "" ) ;
6563 private string ClrParamType ( string clrType ) => clrType . EndsWith ( "Metrics" , StringComparison . OrdinalIgnoreCase )
6664 ? this . MetricPrefix + clrType . Replace ( "Metrics" , "Metric" ) : clrType ;
6765
6866 public IEnumerable < Constructor > RequestConstructors ( )
6967 {
7068 var ctors = new List < Constructor > ( ) ;
69+
7170 if ( IsPartless ) return ctors ;
71+
72+ // Do not generate ctors for scroll apis
73+ // Scroll ids should always be passed as part of the request body and enforced via manual ctors
74+ if ( IsScroll ) return ctors ;
75+
7276 var m = this . RequestType ;
7377 foreach ( var url in this . Url . Paths )
7478 {
@@ -272,6 +276,9 @@ public IEnumerable<FluentRouteSetter> GetFluentRouteSetters()
272276 return setters ;
273277 }
274278
279+
280+ private bool IsPartless => this . Url . Parts == null || ! this . Url . Parts . Any ( ) ;
281+ private bool IsScroll => this . Url . Parts . All ( p => p . Key == "scroll_id" ) ;
275282 public bool IndicesAndTypes => AllParts . Count ( ) == 2 && AllParts . All ( p => p . Type == "list" ) && AllParts . All ( p => new [ ] { "index" , "type" } . Contains ( p . Name ) ) ;
276283 public bool IsDocumentPath => AllParts . Count ( ) == 3 && AllParts . All ( p => p . Type != "list" ) && AllParts . All ( p => new [ ] { "index" , "type" , "id" } . Contains ( p . Name ) ) ;
277284 public IEnumerable < ApiUrlPart > AllParts => ( this . Url ? . Parts ? . Values ?? Enumerable . Empty < ApiUrlPart > ( ) ) . Where ( p => ! string . IsNullOrWhiteSpace ( p . Name ) ) ;
0 commit comments