RESTGEN:Options file

From Remain Software
Jump to navigation Jump to search

Options File

The options file controls the various settings of the RPGLE Free generator. The options file can be found in the "/QOpenSys/TD/Generator/sys" and may exist in "/QOpenSys/TD/Generator/user" directory.

When you want to make changes to the file, you can copy it to the user directory and make changes.

You can also directly add these options in the OAS3 API json file as described here.

The option lookup strategy is:

  • First check the OAS3 specification
  • Check /QOpenSys/TD/Generator/user
  • Check /QOpenSys/TD/Generator/sys

Example Options file

# The options file controls various settings of the RPGLE Free generator.
                                                                         
# This is a variable that can be used in the templates
# all fields defined in this member can be used in templates
companyName="Remain Software"                                            
                                                                         
# This value is added as a prefix while defining subfields               
subFieldPreFix=" "                                                       
                                                                         
# This value controls the prefix of data structure while generating the  
# data structure of a request body.                                      
requestPreFix="rqs_"                                                     
                                                                         
# This value controls the prefix of the data structure while generating  
# the data structure of a response body.                                 
responsePreFix="rsp_"                                                    
                                                                         
# This value is the name of the sourcefile where generated prototype     
# definitions must be stored.                                            
# definitions must be stored.                                              
prototypeSourceFile="QPROTOSRC"                                            
                                                                           
# This value is the name of the sourcefile to contain the user defined     
# code for the business logic of the response and write back of the reply. 
copyBookSourceFile="QCPYLESRC"                                             
                                                                           
# This value defines the location of the generated RPG Free programs.      
sourceFile="QRPGLESRC"                                                     
                                                                           
# This value is the suffix for the module member. Please make sure not to  
# make it too big because the total length of the name may be ten positions.
moduleMemberSuffix="M"                                                     
                                                                           
# This value is the default source type of the module member               
moduleMemberType="SQLRPGLE"                                                
                                                                           
# This value is used as a prefix when generating internal procedures.      
internalprocedureprefix="p"                                                
                                                                        
# When no value is passed for the generation type of the API, this value
# dictates the generation type.                                         
#                                                                       
# ILEASTIC - The program is generated as an ILEASTIC micro service      
# CGI      - The program is generated to be called from Apache or NGINX 
#                                                                       
callType="CGI"                                                          
                                                                        
# This value is used to determine whether the response copybook         
# logic is written in a separate copybook or the main module         
createResponseCopyMember="*NO"                                          
                                                                        
# This value is used to determine whether to generate the unit          
# test for each module                                                  
generateUnitTest="*YES"                                                 
                                                                        
# This value is used to determine whether to generate the compilation   
# scripts for the generated Rest API                                                               
generateCompileScript="*YES"                                                                       
                                                                                                   
# This value determines whether the server has to generate standard CORS handling code.  
# The possible values are                                                                          
# *NO - No CORS code is generated                                                                        
# *HEADERS - CORS code is generated, and the standard headers are added                              
# *NOHEADERS - CORS code is generated, but Headers would be set by apache                            
handle_cors="*NOHEADERS"      

# This value determines whether to add the additional binding directories in
# the generated program. e.g "BNDDIR1,BNDDIR2,...."
# additionalBindingDirs=""