jyotsa09 opened a new issue, #23168:
URL: https://github.com/apache/airflow/issues/23168

   ### Apache Airflow version
   
   2.3.0b1 (pre-release)
   
   ### What happened
   
   Getting error "Extra Field may not be null" while hitting create connection 
api with extra=null
   ```
   {
       "detail": "{'extra': ['Field may not be null.']}",
       "status": 400,
       "title": "Bad Request",
       "type": 
"http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/BadRequest";
   }
   ```
   
   ### What you think should happen instead
   
   I should be able to create connection through API
   
   ### How to reproduce
   
   Steps to reproduce:
   
   1. Hit connection end point with json body
   
   Api Endpoint - api/v1/connections
   HTTP Method - Post
   Json Body -
   ```
   {
   "connection_id": "string6",
   "conn_type": "string",
   "host": "string",
   "login": null,
   "schema": null,
   "port": null,
   "password": "pa$$word",
   "extra":null
   }
   ```
   
   ### Operating System
   
   debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   Astro dev start
   
   ### Anything else
   
   As per code I am assuming it may be null.
   ```
   Connection:
         description: Full representation of the connection.
         allOf:
           - $ref: '#/components/schemas/ConnectionCollectionItem'
           - type: object
             properties:
               password:
                 type: string
                 format: password
                 writeOnly: true
                 description: Password of the connection.
               extra:
                 type: string
                 nullable: true
                 description: Other values that cannot be put into another 
field, e.g. RSA keys.
   ```
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to