You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
# Submit a workflow where withItems is an array of strings.
argo submit https://raw.githubusercontent.com/argoproj/argo/master/examples/loops-dag.yaml
# Grab my branch with the test modified to just list workflows.
git clone https://github.com/mac9416/argo-client-gen
cd argo-client-gen
git checkout withitems-bug
# Build and test.
make java
make test-java
You should receive the following error:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 758 path $.items[0].spec.templates[0].dag.tasks[1].withItems[0]
at io.argoproj.workflow.SmokeIT.testArgoServerAPI(SmokeIT.java:39)
Assuming we can't find a swagger spec that satisfies openapi-generator, maybe the next best solution is to override withItems to be simply a list of objects. That would allow proper posting of workflows. It may even permit proper retrieval, assuming the client can cast to a known type.
To go that route, we'd probably want to create a named, synthetic type in swagger.json to represent the type of withItems. That would allow easily overriding the type by name in openapi-generator. If the type info were embedded directly in the withItems block, I'm not sure it could be overridden so easily.
The text was updated successfully, but these errors were encountered:
To reproduce:
You should receive the following error:
Ideally fixing argoproj/argo-workflows#2790 would fix this. But I suspect that bug will require using Swagger's
oneOf
feature, which it looks like openapi-generator does not yet support.Assuming we can't find a swagger spec that satisfies openapi-generator, maybe the next best solution is to override
withItems
to be simply a list of objects. That would allow proper posting of workflows. It may even permit proper retrieval, assuming the client can cast to a known type.To go that route, we'd probably want to create a named, synthetic type in swagger.json to represent the type of
withItems
. That would allow easily overriding the type by name in openapi-generator. If the type info were embedded directly in thewithItems
block, I'm not sure it could be overridden so easily.The text was updated successfully, but these errors were encountered: