File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -12,21 +12,21 @@ CLIENT_SOURCE_FOLDER="client"
1212
1313# Utility functions
1414function write_step(){
15- echo -e " \e[93m$1 \e[0m"
15+ echo -e " \e[93m$1 \e[0m"
1616}
1717
1818# Entry point
1919if [ " $# " -lt 1 ]; then
20- script_name=$( basename " $0 " )
21- echo " Usage:"
22- echo " $script_name [OPENAPI_DESCRIPTOR_YAML_FILE] [CLIENT_TECHNOLOGY]"
23- echo " "
24- echo " CLIENT_TECHNOLOGY is optional and default to 'java'."
25- echo " "
26- echo " Call example:"
27- echo " $script_name openapi.yml"
28- echo " $script_name openapi.yml python"
29- exit 1
20+ script_name=$( basename " $0 " )
21+ echo " Usage:"
22+ echo " $script_name [OPENAPI_DESCRIPTOR_YAML_FILE] [CLIENT_TECHNOLOGY]"
23+ echo " "
24+ echo " CLIENT_TECHNOLOGY is optional and default to 'java'."
25+ echo " "
26+ echo " Call example:"
27+ echo " $script_name openapi.yml"
28+ echo " $script_name openapi.yml python"
29+ exit 1
3030fi
3131
3232# Main processing
3838fi
3939if [ ! -f $CLI_JAR_FILE ]
4040then
41- write_step " [+] Download the OpenAPI generator CLI from the Maven repository..."
41+ write_step " [+] Download the OpenAPI generator CLI from the Maven repository..."
4242 cli_version=$( curl -sk " $ARTEFACT_BASE_URL /maven-metadata.xml" | grep -F " <release>" | cut -d ' >' -f2 | cut -d ' <' -f1 | tr -d ' ' )
4343 curl -sk --output $CLI_JAR_FILE " $ARTEFACT_BASE_URL /$cli_version /openapi-generator-cli-$cli_version .jar"
4444 file $CLI_JAR_FILE
4545fi
4646write_step " [+] Generate the '$tech ' client code into the folder '$CLIENT_SOURCE_FOLDER ' ..."
4747rm -rf $CLIENT_SOURCE_FOLDER /
4848java -jar $CLI_JAR_FILE generate -g $tech -o $CLIENT_SOURCE_FOLDER -i $openapi_descriptor_file 1> /dev/null
49- ls -l $CLIENT_SOURCE_FOLDER
49+ ls -l $CLIENT_SOURCE_FOLDER
You can’t perform that action at this time.
0 commit comments