Contributions
Python Client Side No Type Validation beyond checking NoneType
So I used openapi to generate my client side python code and was wondering about type validation in the auto generated models. I see that at the top there is always a dictionary of parameters with their required type, but there isn't any validation being done when you create an instance of that model beyond if you set the nullable value to false? Is there something in the contract that I have to do to turn on validation or is it just not supported for python?478Views0likes0CommentsPolymorphic responses in Python Client Side
Code generation for the response of a method that has multiple possible accepted response schemas is broken in generated python code. I have a GET method that is supposed utilize 3.0's polymorphic capabilities by having a response that should return "oneOf" 3 types of schemas. My response looks like this: components: responses: RunResponse: description: different response types for Runs content: application/json: schema: oneOf: - $ref: '#/components/schemas/AllRun' - $ref: '#/components/schemas/IonRun' - $ref: '#/components/schemas/IllRun' But in the response type in the generated code it is looking for this: When ran with this as the response type I get an error as there is no model of "OneOfAllRunsIonRunsIllruns". How can this be fixed? Because as of right now polymorphism doesn't work with python generated code.710Views1like0CommentsCreating schema that contains auto incremented value from database
So I have a table in my sql database that has an auto incremented id field. This field is auto incremented on the database side. My generated python function to add a row to this table has a variable that asks for the field that can't take a None value. I want my auto generated add row function to not ask for or have that variable at all, but I want my get row function to show the variable.This generates the field thisId in my add row function which isn't good. What is the proper way to do this? This is what I have now for the specific property: properties: thisId: type: integer description: blah blah blah readOnly: true nullable: trueSolved1.3KViews0likes1Comment