forked from loafle/openapi-generator-original
3 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
d4b8ff60a1
|
[Java] Fixes schema class type booleans for composed schemas (#10334)
* Adds get/setIsString interface to IJsonSchemaValidationProperties * Adds get/set isNumber interface in IJsonSchemaValidationProperties * Adds get/set isAnyType in IJsonSchemaValidationProperties * Adds and uses ModelUtils.isAnyType, adds setTypeProperties * Adds missing descriptions of isAnyType parameters * Uses ModelUtils.isAnyType * Samples regenerated * Moves isArray handling higher up in fromProperty * Moves isAnyTypeSchema handling higher up in fromProperty * Moves isFreeFormObject handling higher up in fromProperty * Refactors fromProperties, updates tests * Fixes the fromProperty refactor, tests now pass * Uses setTypeProperties to set isNumber, isNull, isArray, and isUnboundedInteger * Sets isAnyType in setTypeProperties * Sets isMap in setTypeProperties * Sets property.isPrimitiveType in isFreeFormObject, tweaks if condition order * Adds fix for JavaClientCodegenTest.testJdkHttpClientWithAndWithoutDiscriminator * Refactors fromProperty * Adds updatePropertyForObject updatePropertyForAnyType * Sets binary and file types to not be strings * Updates samples * Adds updatePropertyForString * Adds testComposedPropertyTypes * Fixes python test * Samples updated * Switches all isAnyTypeSchema usages to ModelUtils.isAnyType * Refactors model enum handling higher up * Moves m.dataType assignent higher into fromModel * Moves m.isNullable setting higher into isModel * Adds updateModelForComposedSchema * Further fromModel refactoring, all schema checks are now at the same indentation level * Further refactors fromModel, adds isTypeObjectSchema block * Moves addVars into anyType or objectType blocks in fromModel * Turns off isNullable n isAnyType array * Fixes typescript CodegenParameers * Adds updatePropertyForAnyType to typescript-axios so property.isNullable will be false for AnyType * Adds testComposedModelTypes * Updates ComposedAnyType schema * Fixes tests for JavaJAXRSCXF by adding updateModelForObject method * Updates go and csharp to handle object model differently * Adds updateModelForAnyType * Fixes name reference * Adds testComposedResponseTypes * Refactoring fromResponse * Further refactoring of fromResponse * Uses setTypeProperties in fromResponse * Tests now pass for testComposedResponseTypes * Sets COdegenResponse dataType using getTypeDeclaration * Begins refactoring of fromRequestBody * Adds updateResponseBodyForPrimitiveType * Adds all needed type if else blocks in fromRequestBody * Fixes JavaJAXRSCXFExtServerCodegenTests * Fixes RubyClientCodegenTests * Adds fixes for clients that need custom isMap for body parameters * Ruby broken, samples regened, debugging * Adds updateRequestBodyForArray, renames updateRequest.. methods * Samples regenerated * Removes changes from Ruby generator * Reverts RubyClientCodegen.java * Reverts changes to GoClientCodegen.java * Reverts PowerShellClientCodegen.java * Reverts CrystalClientCodegen.java * Removes updateRequestBodyForObject from JavaCXFServerCodegen.java * Adds comment about refed models * Tweaks made to fromProperties to add an explanatory comment * Updates RustServer to have ByteArray request bodies not be strings * Sets types in fromFormProperty * Adds testComposedRequestBodyTypes * Fixes when validation syncing is done in syncValidationProperties * Removes redundant validation code from fromParameter * Moves parameter inX setting higher up before schema logic in fromParameter * More refactoring in fromParameter, uses early return to reduce levels of indentation * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForArray * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForObject * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForPrimitiveType * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForMap * Removes setParameterBooleanFlagWithCodegenProperty from addBodyModelSchema * Removes setParameterBooleanFlagWithCodegenProperty from fromFormProperty * Refactors parameter array handling code into fromFormProperty * Simplifies fromRequestBodyToFormParameters * Removes setParameterBooleanFlagWithCodegenProperty from fromParameter * Adds deprecated docstring to setParameterBooleanFlagWithCodegenProperty * Refactors ModelUtils.isFileSchema out of string schema check * Removes ModelUtils.isFileSchema from RustServer updateRequestBodyForString * Improves comment text * Fixes RustServer uuid type setting for CodegenParameter * Removes unneeded parens * Fixes array property examples * Removes unused code * Renames variable to itemsProperty * Adds testComposedRequestQueryParamTypes * Adds updatePropertyForAnyType to rustserver will not have changed model properties * Hoists arrayInnerProperty._enum into parameter for html2 generator * Moves turning string type off into the codegen files * Adds two more missing locations in rustserver * Moves addVarsRequiredVarsAdditionalProps into anytype and objecttype handling * More refactoring of where addVarsRequiredVarsAdditionalProps is used * Samples regenerated |
||
|
50acdcb4a3
|
Fix python generated markdown documentation for Jekyll (#10111)
* Fix python generated markdown documentation * Generated `build the project` and upate sample scripts |
||
|
6cc270633b
|
[python] Fixes additional_properties_type for models (#8802)
* Fixes additionalProperties values for models, updates docs, adds tag test of it, fixes frit and gmfruit tests * Moves this.setDisallowAdditionalPropertiesIfNotPresent higher * Makes setting additional_properties_model_instances contingent on the presence of addprosp in schema, updates sample spec composed schemas to remove addprops False form two * Fixes oneOf anyOf allOf instantiation logic * Removes Address from Cat definition * Adds required vars for apple and banana, removes required vars from composed schema init sig * Updates composed schema vars to be set on self and all composed instances * Removes get_unused_args, get_var_name_to_model_instances, and get_additional_properties_model_instances * Fixes fruit + deserilization tests, creates ComposedSchemaWithPropsAndNoAddProps * Fixes FruitReq tests * Fixes GmFruit tests * Fixes discard_unknown_keys tests * Samples updated * Removes additionalproperties False in Child * Samples updated * Improves handling of v2 and v3 specs for isFreeFormObject, v2 sample spec updated with link to bug * Adds cli option disallowAdditionalPropertiesIfNotPresent to python * Adds getAdditionalProperties method so the value for addProps will be correct * Reverts file * Reverts file * Updates python doc * Reverted anytype_3 definition * Updates test_deserialize_lizard * Updates test_deserialize_dict_str_dog * Updates testDog * Updates testChild * Adds v2 python_composition sample * Adds needed files for python testing * Adds existing tests into the new python sample * Fixes test_dog * Removes addProps false form Dog * Fixes testChild * Updates how additionalProperties are set * Fixes empty_map type * Type generation fixed for v2 and v3 specs * Refactors getTypeString, updates artifactids in pom.xml files * Adds new python sample to CI testing I think * Fixes artifactId collision, regenrates docs |