You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/06/14 20:20:41 UTC

[GitHub] [airflow-client-go] houqp commented on a change in pull request #10: upgrade go client to latest api spec using openapi-generator 5.x

houqp commented on a change in pull request #10:
URL: https://github.com/apache/airflow-client-go/pull/10#discussion_r651249803



##########
File path: README.md
##########
@@ -36,19 +36,18 @@ import (
 )
 
 func main() {
-	cli := airflow.NewAPIClient(&airflow.Configuration{
-		Scheme:   "http",
-		Host:     "localhost:8080",
-		BasePath: "/api/v1",
-	})
+	conf := airflow.NewConfiguration()
+	conf.Host = "localhost:8080"
+	conf.Scheme = "http"
+	cli := airflow.NewAPIClient(conf)
 
 	cred := airflow.BasicAuth{
 		UserName: "username",
 		Password: "password",
 	}
 	ctx := context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)
 
-	variable, _, err := cli.VariableApi.GetVariable(ctx, "foo")
+	variable, _, err := cli.VariableApi.GetVariable(ctx, "foo").Execute()

Review comment:
       unfortunately openapi-generator 5.x introduced breaking change in their go code gen.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org