Troubleshooting stub file creation

Learn how to troubleshoot stub file creation.

The stub file generated from the specification file must be error free or otherwise the stub file does not get generated. A variety of issues may cause errors. The most common errors are those caused by incompatible types, missing variables, or other issues.

The fglrestful tool writes errors to the standard output. You can see these if errors are reported when you generate the stub file. Errors, such as the following, will stop the generation of the stub file.
Error in /paths/Property/UpdateProperties/{applicationID}/post/requestbody
Reason : ComplexType='UpdatePropertiesRequestBodyType' not supported on binary operation
The error message relates to incompatible types. Messages contain the path to where in the openapi.json file errors occurred, and what the reason was. You can refer to the specification file to try to isolate the problem and determine if it is an issue that you can resolve or one that needs the assistance of your local Four Js support center.

Display warnings

Warnings, unlike errors, will not stop the stub file creation but displaying them may help you debug. You can opt to display warnings by running the fglrestful command with the warning option set to yes:

fglrestful -W yes -o stub_filename http://localhost:8090/MyService?openapi.json
For example, this warning describes a function with a duplicate id.
Warning in /paths/Liability/GetReasonTypes/{subscriberId}
Reason : OperationId=GetReasonTypes has already been defined, append _1