Respect writeOnly ? #672
georgkrause
started this conversation in
Feature request
Replies: 1 comment 2 replies
-
writeOnly isn't supported yet in this project, but it should be added eventually. I opened an issue to track that 😊 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
thanks for the great project, great work! Keep it going!
I am totally new to the whole openapi universe and its a great adventure. The API I am working with is not really perfect and has a lot of issues I need to work on, but one thing I noticed is a bit weird:
My API has types with fields that are specified with
writeOnly
, which seems to me like an indicator this field is only available when sending data to the API. But when I generate the python client using this lib and run a GET request against the endpoint, the deserialization fails because the field is expected but missing.This seems to be a common issue, since my generator (DRF-Spectacular) even has documentation for this: https://drf-spectacular.readthedocs.io/en/latest/client_generation.html?highlight=writeonly#component-issues
And indeed, turning on the component split solves the problem. Nevertheless, I am not sure if this something
openapi-python-client
should respect, according to the specs? For now its just a question, as I said I am a newbe and happy to learn my lessons here. If you consider this to be something to work on, I won't mind creating an issue for this.Thank you a lot and hive a nice day 🌥️
Beta Was this translation helpful? Give feedback.
All reactions