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 2022/04/22 10:48:24 UTC
[GitHub] [airflow] jyotsa09 opened a new issue, #23168: Getting error "Extra Field may not be null" while hitting create connection api with extra=null
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ephraimbuddy closed issue #23168: Getting error "Extra Field may not be null" while hitting create connection api with extra=null
Posted by GitBox <gi...@apache.org>.
ephraimbuddy closed issue #23168: Getting error "Extra Field may not be null" while hitting create connection api with extra=null
URL: https://github.com/apache/airflow/issues/23168
--
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] tirkarthi commented on issue #23168: Getting error "Extra Field may not be null" while hitting create connection api with extra=null
Posted by GitBox <gi...@apache.org>.
tirkarthi commented on issue #23168:
URL: https://github.com/apache/airflow/issues/23168#issuecomment-1107374479
We might need to pass `allow_none=True` to `extra` since `obj.extra` just returns when None in serialize method.
https://github.com/apache/airflow/blob/22ba59c5f26d1e6fa2ce59e99304628b2f0a0fd9/airflow/api_connexion/schemas/connection_schema.py#L44-L61
--
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