abundant-tent-27407
08/06/2024, 8:20 AMrun_shell_command
that this would happen:
Also, the outputs does not apply, as any output files produced will end up directly in your project tree.
What am I missing here?abundant-tent-27407
08/06/2024, 8:20 AM# curl -L <https://beta.optimeering.com/api/docs/openapi_public.json> | tee >(wc -c) >(shasum -a 256) >/dev/null
resource(
name="openapi-schema",
source=http_source(
url="<https://beta.optimeering.com/api/docs/openapi_public.json>",
sha256="6587bbdb2a7bed438aaedba2d961ef3afd41766725363e61adc8117c2ee78eab",
len=33973
)
)
# Specify JAR dependencies
jvm_artifact(
name="openapi-generator",
group="org.openapitools",
artifact="openapi-generator-cli",
version="7.7.0",
)
# Generate the openapi bindings from a schema produced by a different step
adhoc_tool(
name="generator",
runnable=":openapi-generator",
args=[
"generate",
"-i",
"generate_v2/openapi_public.json",
"--skip-validate-spec",
"-g",
"python",
"-o",
"./sdk",
],
execution_dependencies=[
":openapi-schema",
],
output_directories=[
"sdk/",
],
workdir="/",
root_output_directory=".",
)
run_shell_command(
name="run-generator",
command="echo Generated client",
execution_dependencies=[":generator"],
)
broad-processor-92400
08/06/2024, 10:15 AMcommand
itself runs outside a sandbox. You can/should copy from the sandbox to the workspace.
This is what we do for similar use cases: https://github.com/pantsbuild/pants/discussions/18235#discussioncomment-6655594abundant-tent-27407
08/06/2024, 10:36 AM