williamfmr opened a new issue #20320:
URL: https://github.com/apache/airflow/issues/20320


   ### Apache Airflow version
   
   2.2.2 (latest released)
   
   ### What happened
   
   When listing users via GET api/v1/users, a 500 error is thrown if a user in 
the database does not have a last name. 
   
   ```
   {
     "detail": "'' is too short\n\nFailed validating 'minLength' in 
schema['allOf'][0]['properties']['users']['items']['properties']['last_name']:\n
    {'description': 'The user lastname', 'minLength': 1, 'type': 
'string'}\n\nOn instance['users'][25]['last_name']:\n    ''",
     "status": 500,
     "title": "Response body does not conform to specification",
     "type": 
"https://airflow.apache.org/docs/apache-airflow/2.2.2/stable-rest-api-ref.html#section/Errors/Unknown";
   }
   ```
   
   ### What you expected to happen
   
   Result set should still be returned with a null or empty value for the last 
name instead of a 500 error.
   
   ### How to reproduce
   
   Create a user in the database without a last name and then hit GET 
api/v1/users
   
   ### Operating System
   
   linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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