7575import static org .elasticsearch .xpack .esql .expression .function .EsqlFunctionRegistry .mapParam ;
7676import static org .elasticsearch .xpack .esql .expression .function .EsqlFunctionRegistry .param ;
7777import static org .elasticsearch .xpack .esql .expression .function .EsqlFunctionRegistry .paramWithoutAnnotation ;
78- import static org .elasticsearch .xpack .esql .expression .function .FunctionAppliesToLifecycle .GA ;
7978
8079/**
8180 * This class exists to support the new Docs V3 system.
@@ -97,7 +96,6 @@ public abstract class DocsV3Support {
9796 protected static final String DOCS_WARNING =
9897 "% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.\n \n " ;
9998
100-
10199 static FunctionDocsSupport forFunctions (String name , Class <?> testClass ) {
102100 return new FunctionDocsSupport (name , testClass );
103101 }
@@ -597,11 +595,11 @@ private String makeCallout(String type, String text) {
597595 }
598596
599597 private void appendLifeCycleAndVersion (StringBuilder appliesToText , FunctionAppliesTo appliesTo ) {
600- appliesToText .append (appliesTo .lifeCycle ().name ().toLowerCase (Locale .ROOT ));
601- if (appliesTo .version ().isEmpty () == false ) {
602- appliesToText .append (" " ).append (appliesTo .version ());
603- }
604- }
598+ appliesToText .append (appliesTo .lifeCycle ().name ().toLowerCase (Locale .ROOT ));
599+ if (appliesTo .version ().isEmpty () == false ) {
600+ appliesToText .append (" " ).append (appliesTo .version ());
601+ }
602+ }
605603
606604 private String makeAppliesToText (FunctionAppliesTo [] functionAppliesTos ) {
607605 StringBuilder appliesToText = new StringBuilder ();
@@ -638,40 +636,40 @@ private String makeAppliesToText(FunctionAppliesTo[] functionAppliesTos) {
638636 }
639637
640638 private void renderFullLayout (FunctionInfo info , boolean hasExamples , boolean hasAppendix , boolean hasFunctionOptions )
641- throws IOException {
642- String headingMarkdown = "#" .repeat (2 + info .depthOffset ());
643- StringBuilder rendered = new StringBuilder (
644- DOCS_WARNING + """
645- $HEAD$ `$UPPER_NAME$` [esql-$NAME$]
646- $APPLIES_TO$
647- **Syntax**
648-
649- :::{image} ../../../images/$CATEGORY$/$NAME$.svg
650- :alt: Embedded
651- :class: text-center
652- :::
653-
654- """ .replace ("$HEAD$" , headingMarkdown )
655- .replace ("$NAME$" , name )
656- .replace ("$CATEGORY$" , category )
657- .replace ("$UPPER_NAME$" , name .toUpperCase (Locale .ROOT ))
658- .replace ("$APPLIES_TO$" , makeAppliesToText (info .appliesTo ()))
659- );
660- for (String section : new String [] { "parameters" , "description" , "types" }) {
661- rendered .append (addInclude (section ));
662- }
663- if (hasFunctionOptions ) {
664- rendered .append (addInclude ("functionNamedParams" ));
665- }
666- if (hasExamples ) {
667- rendered .append (addInclude ("examples" ));
668- }
669- if (hasAppendix ) {
670- rendered .append (addInclude ("appendix" ));
671- }
672- logger .info ("Writing layout for [{}]:\n {}" , name , rendered .toString ());
673- writeToTempSnippetsDir ("layout" , rendered .toString ());
674- }
639+ throws IOException {
640+ String headingMarkdown = "#" .repeat (2 + info .depthOffset ());
641+ StringBuilder rendered = new StringBuilder (
642+ DOCS_WARNING + """
643+ $HEAD$ `$UPPER_NAME$` [esql-$NAME$]
644+ $APPLIES_TO$
645+ **Syntax**
646+
647+ :::{image} ../../../images/$CATEGORY$/$NAME$.svg
648+ :alt: Embedded
649+ :class: text-center
650+ :::
651+
652+ """ .replace ("$HEAD$" , headingMarkdown )
653+ .replace ("$NAME$" , name )
654+ .replace ("$CATEGORY$" , category )
655+ .replace ("$UPPER_NAME$" , name .toUpperCase (Locale .ROOT ))
656+ .replace ("$APPLIES_TO$" , makeAppliesToText (info .appliesTo ()))
657+ );
658+ for (String section : new String [] { "parameters" , "description" , "types" }) {
659+ rendered .append (addInclude (section ));
660+ }
661+ if (hasFunctionOptions ) {
662+ rendered .append (addInclude ("functionNamedParams" ));
663+ }
664+ if (hasExamples ) {
665+ rendered .append (addInclude ("examples" ));
666+ }
667+ if (hasAppendix ) {
668+ rendered .append (addInclude ("appendix" ));
669+ }
670+ logger .info ("Writing layout for [{}]:\n {}" , name , rendered .toString ());
671+ writeToTempSnippetsDir ("layout" , rendered .toString ());
672+ }
675673
676674 private String addInclude (String section ) {
677675 return """
0 commit comments