Python attributes are Optional, despite required in OAS schema #4750
Labels
duplicate
This issue or pull request already exists
enhancement
New feature or request
Needs: Attention 👋
Milestone
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Mac executable
Client library/SDK language
Python
Describe the bug
I have some OAS properties as
required
.When generating Python, the models are rendered with Optional attributes, for example
Optional[str] = None
.i.e.:
gets rendered as:
Where instead expected for
name
andvalue
not to be Optional attributes.Expected behavior
If an OAS property is
required
,in the target language it should be required too.
How to reproduce
first example:
second example:
Open API description file
No response
Kiota Version
1.15.0-preview.202405300001+76b8e1bdaf86000dc03cfdec19528192745ff3b4
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
No response
Other information
This might be also related to:
and other target languages?
The text was updated successfully, but these errors were encountered: