diff --git a/.gitignore b/.gitignore index b3eb4c17b7..6a888d4651 100644 --- a/.gitignore +++ b/.gitignore @@ -107,6 +107,7 @@ result* .vscode **/.idea/ .temp/ +tests/tmp/ # std .std diff --git a/tests/Earthfile b/tests/Earthfile new file mode 100644 index 0000000000..6648477e76 --- /dev/null +++ b/tests/Earthfile @@ -0,0 +1,27 @@ +VERSION 0.7 + +FROM debian:stable-slim + +# BASH, CURL, GPG, NODEJS, NPM, JRE +dependencies: + RUN apt-get update + RUN apt-get install bash + RUN apt-get install curl -y + RUN apt-get install gpg -y + RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + RUN apt-get install nodejs -y + RUN apt-get install npm -y + RUN apt-get install default-jre -y + +generate-client: + FROM +dependencies + + # TODO(@nicopado): Get the correct file from openapi doc generation target - https://github.com/input-output-hk/catalyst-core/issues/589 + ARG openapispec_file="./petstore.yaml" + COPY $openapispec_file . + + RUN npm install @openapitools/openapi-generator-cli -g + + RUN openapi-generator-cli validate -i $openapispec_file + + RUN openapi-generator-cli generate -i $openapispec_file -g rust -o ./tmp/client/ --package-name cat-data-service-client \ No newline at end of file