Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currently known issues with swagger-codegen #7

Open
jetmuffin opened this issue Jul 18, 2018 · 2 comments
Open

Currently known issues with swagger-codegen #7

jetmuffin opened this issue Jul 18, 2018 · 2 comments

Comments

@jetmuffin
Copy link
Member

jetmuffin commented Jul 18, 2018

Codes in tfjob-java-client/kubernetes are generated by swagger-codegen-maven-plugin automatically, but there are some issues which should be fixed manually:

  1. Missing import-package io.kubernetes.client.models.V1DeleteOptions in org.kubeflow.client.apis.KubeflowOrgV1alpha2Api and org.kubeflow.client.apis.KubeflowOrgV1alpha2ApiTest.

  2. Missing member variable formatter in DateTimeTypeAdapter function of org.kubeflow.client.JSON class.

private DateTimeFormatter formatter;
  1. Missing kubernetes dependency in pom.xml
  <dependency>
    <groupId>io.kubernetes</groupId>
    <artifactId>client-java</artifactId>
    <version>1.0.0</version>
  </dependency>
  1. Missing parent tag in pom.xml
  <parent>
    <groupId>org.kubeflow.client</groupId>
    <artifactId>client-java-parent</artifactId>
    <version>0.1.0-SNAPSHOT</version>
  </parent>
  1. Missing some codes in org.kubeflow.client.ApiClientL91
authentications.put("BearerToken", new ApiKeyAuth("header", "authorization"));
authentications.put("BasicAuth", new HttpBasicAuth());
@gaocegege
Copy link
Member

Thanks for the issue!

@Cas-pian
Copy link

Cas-pian commented May 5, 2019

Thanks for your great work! I've found two issues with the code generated:

  1. Bearer Token auth is missing, will cause a 403 Forbidden error when run the code in k8s cluster, fix:
find . -name "*.java" | xargs sed -i 's/String\[\] localVarAuthNames = new String\[\] {  }/String\[\] localVarAuthNames = new String\[]{\"BearerToken\"}/g'
  1. Delete tfjob succeed but return failed, cause of the check success should be upper-class, fix:
sed -i 's/equals("success")/equals("Success")/g' client/src/main/java/org/kubeflow/client/KubeflowClient.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants