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/07/22 19:13:14 UTC

[GitHub] [airflow] WingCode opened a new issue #17172: Basic Auth Not Passed In OpenAI Codegen Client

WingCode opened a new issue #17172:
URL: https://github.com/apache/airflow/issues/17172


   **Apache Airflow version**:  2.1.2
   
   **Environment**: OpenApi-generator 5.2.1-SNAPSHOT
   
   **What happened**:
   Call any APIs from the java code generated using https://airflow.apache.org/docs/apache-airflow/stable/_specs/v1.yaml fails with an API exception: UNAUTHORISED
   
   **What you expected to happen**:
   The API to succeed & return with a collection of DAGs
   
   
   On closer inspection of the request sent, the request auth parameters is not present. In the generated java code,
   DagApi.class
   ```
    public okhttp3.Call getDagCall(String dagId, final ApiCallback _callback) throws ApiException{
    ...
   String[] localVarAuthNames = new String[] {   };
   }
   ```
   The variable localVarAuthNames is initialised with empty parameters.
   
   **How to reproduce it**:
   Get the jar from https://github.com/OpenAPITools/openapi-generator#13---download-jar
   Generate the java client using
   `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./v1.yaml -g java \
    -o ./java-airflow-client`
   
   Create a java test containing the code
   ```
   import ApiClient;
   import DagAPI;
   
   ApiClient apiClient = new ApiClient();
   apiClient.setUsername("WingCode"); // Change this to your setup
   apiClient.setPassword("MyNotSoSecretPassword"); // Change this to your setup
   apiClient.setBasePath("http://localhost:8080/api/v1"); // Change this to your setup
   DagApi dagApi = new DagApi(apiClient);
       
   DAGCollection a = dagApi.getDags(1, null, null, null);
   ```
   The API call should fail throwing an exception: UNAUTHORISED
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] eladkal closed issue #17172: Basic Auth Not Passed In OpenAI Codegen Client

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #17172:
URL: https://github.com/apache/airflow/issues/17172


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] eladkal commented on issue #17172: Basic Auth Not Passed In OpenAI Codegen Client

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #17172:
URL: https://github.com/apache/airflow/issues/17172#issuecomment-997361564


   fixed in https://github.com/apache/airflow-client-python/pull/33


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #17172: Basic Auth Not Passed In OpenAI Codegen Client

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17172:
URL: https://github.com/apache/airflow/issues/17172#issuecomment-885166867


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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