github.com/go-swagger/go-swagger@v0.31.0/docs/reference/templates/templates.md (about)

     1  ---
     2  title: Customizing templates
     3  date: 2023-01-01T01:01:01-08:00
     4  draft: true
     5  weight: 60
     6  ---
     7  # Use custom templates
     8  
     9  When generating a server or client you can specify a directory to load custom templates from 
    10  with `--template-dir`. It will recursively read all the `.gotmpl` files in the directory and 
    11  load them as templates.
    12  
    13  <!--more-->
    14  
    15  Each file will be loaded and define a template named the same as the file without the suffix. If 
    16  the file is in a subdirectory the directory name will be included in the template name and the
    17  first character of the next path segment will be uppercased. e.g. 
    18   - template.gotmpl -> template
    19   - server/test.gotmpl -> serverTest
    20  
    21  You can override the following templates. Check go-swagger/generator/templates for the default
    22  definitions.
    23   
    24  # Available Templates
    25  
    26  # Client Templates
    27  
    28  ## clientFacade
    29  Defined in `client/facade.gotmpl`
    30  
    31  ## clientResponse
    32  Defined in `client/response.gotmpl`
    33  ####requires 
    34   - clientresponse
    35   - schema
    36   - docstring
    37  
    38  ## clientClient
    39  Defined in `client/client.gotmpl`
    40  
    41  
    42  # Server Templates
    43  
    44  ## serverParameter
    45  Defined in `server/parameter.gotmpl`
    46  ####requires 
    47   - propertyparamvalidator
    48   - sliceparambinder
    49  
    50  ## serverResponses
    51  Defined in `server/responses.gotmpl`
    52  ####requires 
    53   - serverresponse
    54  
    55  ## serverresponse
    56  Defined in `server/responses.gotmpl`
    57  
    58  
    59  ## propertyparamvalidator
    60  Defined in `server/parameter.gotmpl`
    61  ####requires 
    62   - validationPrimitive
    63   - sliceparamvalidator
    64  
    65  ## bindprimitiveparam
    66  Defined in `server/parameter.gotmpl`
    67  
    68  ## serverBuilder
    69  Defined in `server/builder.gotmpl`
    70