mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-03 18:23:44 +00:00 
			
		
		
		
	* Includes Kotlin multiplatform client Kotlin multiplatform allows Kotlin code to be shared across various target platforms. This implementation generates Swagger clients for JVM and iOS platforms. * Includes Kotlin Multiplatform sample scripts * Updates existing Kotlin samples * Includes Kotlin Multiplatform samples * Fixes incorrect Windows sample resource location * Updates Kotlin client documentation * Removes unnecessary workaround to remove duplicate entries * Includes additional multiplatform type and import mappings * Fixes Kotlin client definitions with multiple enums https://github.com/OpenAPITools/openapi-generator/issues/3917 * Updates Kotlin samples
		
			
				
	
	
		
			33 lines
		
	
	
		
			979 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			979 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
SCRIPT="$0"
 | 
						|
echo "# START SCRIPT: $SCRIPT"
 | 
						|
 | 
						|
while [ -h "$SCRIPT" ] ; do
 | 
						|
  ls=$(ls -ld "$SCRIPT")
 | 
						|
  link=$(expr "$ls" : '.*-> \(.*\)$')
 | 
						|
  if expr "$link" : '/.*' > /dev/null; then
 | 
						|
    SCRIPT="$link"
 | 
						|
  else
 | 
						|
    SCRIPT=$(dirname "$SCRIPT")/"$link"
 | 
						|
  fi
 | 
						|
done
 | 
						|
 | 
						|
if [ ! -d "${APP_DIR}" ]; then
 | 
						|
  APP_DIR=$(dirname "$SCRIPT")/..
 | 
						|
  APP_DIR=$(cd "${APP_DIR}"; pwd)
 | 
						|
fi
 | 
						|
 | 
						|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
 | 
						|
 | 
						|
if [ ! -f "$executable" ]
 | 
						|
then
 | 
						|
  mvn -B clean package
 | 
						|
fi
 | 
						|
 | 
						|
# if you've executed sbt assembly previously it will use that instead.
 | 
						|
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
 | 
						|
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/client/petstore/kotlin-multiplatform $@"
 | 
						|
 | 
						|
java ${JAVA_OPTS} -jar ${executable} ${ags}
 |