Skip to content

Instantly share code, notes, and snippets.

@bodograumann
Last active May 12, 2023 11:04
Show Gist options
  • Save bodograumann/4fb6edb0fd2b0639ec7aa2cd466ab813 to your computer and use it in GitHub Desktop.
Save bodograumann/4fb6edb0fd2b0639ec7aa2cd466ab813 to your computer and use it in GitHub Desktop.
openapi-generator typescript contribution cheat sheet
# Rebuild project
mvn -T 8 clean package -DskipTests -Dmaven.javadoc.skip=true
# Generate sample clients
./bin/generate-samples.sh ./bin/configs/typescript-consolidated-*
# Build sample clients
for pom in samples/openapi3/client/petstore/typescript/builds/*/pom.xml
do
echo "[\e[1m$pom\e[0m]"
mvn integration-test -f $pom
done
# Start local petstore service
# First time:
docker run --name petstore -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
# Later:
docker start petstore
# Setup /etc/hosts
sudo sh -c 'echo "127.0.0.1 petstore.swagger.io\n::1 petstore.swagger.io" >> /etc/hosts'
# Run tests for clients
for pom in samples/openapi3/client/petstore/typescript/tests/*/pom.xml
do
echo "[\e[1m$pom\e[0m]"
mvn integration-test -f $pom
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment