* Adds Unset type hint for use cases containing additional properties
* Simplifies no addProps type hint template
* Unset type hints added when additionalProperties are off
* Adds __getitem__ unset fix
* Adds unset test
* Fixes non overload method when addprops are present
* Sample regenrated, tests added, readme updated
* Unit test sample updated
* Reverts version files
* Uses frozendict module import in schemas and api_client
* Regnerates sample
* Adds overload type hints
* Adds __getitem__ methods for invalidly name properties
* Fixes code that instantiates referenced schemas in object payloads
* Fixes getitem literals containing control charaters
* Sorts params by required, adds type hints for properties with addProps turned off
* Unit test spec sample regenerated
* Adds stub files for models and endpoints
* Omitting some endpoint info from endpoint stub files
* Removes more from endpoint stub
* Deletes all except for schema definition in endpoint stubs
* Removes simple validations from stubs
* Removes endpoint parameter deifnition from endpoints stubs
* Removes unnecessary ../ stub variable access
* Samples regenerated
* Samples regenerated, fixed handling of invalidly named properties
* Samples regenerated
* Reverts version files
* Regenerates sample with additional enum values
* Sample regenerated, array type hints working
* Unit test sample regenerated
* Removes unneeded __getattribute__
* Sample regenerated using getRequiredVarsMap for property type hints
* Adds schemaFromAdditionalProperties to tell if a CodegenProperty is from properties or additionalProperties
* Adds get/setSchemaIsFromAdditionalProperties
* Updates codegenModel
* Updates codegenParameter
* Updates codegenResponse
* Uses setSchemaIsFromAdditionalProperties
* Fixes array new typ ehint and additional property type hints
* Samples regenerated
* Adds missing parms to javadoc
* Fixes param name
* Adds missing param to javadoc
* Combine javascript and javascript-apollo generator functionality
* Combine javascript and javascript-apollo templates
* update configs
* deprecate javascript-apollo generator
* bonus magic string deletion ✨
* update samples
* update generator docs
* fix: include .babelrc in apollo generation
* update samples
* update samples
* rename javascript-apollo to javascript-apollo-deprecated
* fix javascript apollo library template
Apollo library now uses the partial_model_generic template file from the ES6 library, as it includes many fixes and improvements (including handling models with ill-named attributes)
* update samples
* Create javascript-apollo-deprecated.md
* Updated javascript generator template's gitignore
Updates .gitignore with that from https://github.com/github/gitignore/blob/main/Node.gitignore
Main reason for the update is to ignore the 'dist' folder with compiled files by default.
* javascript generator: merge api_test template files
The only difference is that Apollo is not designed for browser, so having a "if(browser)" check is useless, but doesn't hurt.
* update docs
* cleanup
* avoid possible config clash
* update javascript-apollo sample
* update javascript-es6 sample
I kept the pom.xml from before
* update javascript-promise-es6 sample
kept pom.xml
* update samples
* Templates updated, dict properties moved into Meta
* Fixes tests
* Renames _discriminator to discriminator
* Moves required vars into required
* Renames _additional_properties to additional_properties
* Adds MetaOapgTyped
* Adds type hints for MetaOapg to classes that neen it
* Adds StrMixin
* Adds DecimalMixin
* Adds BoolMixin
* Adds NoneMixin
* Adds TupleMixin
* Adds FrozenDictMixin
* Regenerates unit test samples
* Only quotes type hints if they are imported
* Moves _items into Meta
* Renames _items to items, various small type hint fixes
* Adds type hints for object model new signature
* Adds type hints for body schema primitive types
* Adds primitive types to all query/path/header/cookie params
* Samples regenerated for unit test api
* Version files fixed
* Javascript Generator: small sanitization changes
Sanitize module name, do not sanitize description.
If we set the project name to "@myorg/mypackage" (scoped package[1]), running `npm test` will fail, as it will generate faulty code due to the module name including the '@' symbol, which is not a valid JS identifier.
Additionally, we don't need to sanitize the description - spaces and special characters are fine. We just need to make sure they are escaped, which we're already doing by invoking escapeText() on line 329
[1]anitize module name, do not sanitize description
* update JS samples
* fix TypescriptAngularPetstoreIntegrationTest
(since this has been abandoned for a long time: just copy the generated code the the "expected" directory)
* fix TypescriptAngularArrayAndObjectIntegrationTest
(since this has been abandoned for a long time: just copy the generated code the the "expected" directory)
* fix TypescriptAngularAdditionalPropertiesIntegrationTest
(since this has been abandoned for a long time: just copy the generated code the the "expected" directory)
* fixes#13131: add custom path parameter expansion to typescript-angular
* fixes#13131: add example for typescript-angular: paramExpansionStrategy=custom
* fixes#13131: document usage of paramExpansionStrategy=custom in README.mustache
* fixes#13131: fix unit tests and sample url for http-param-expander package
* fixes#13131: update samples
* fixes#13131: drop new cli parameter, handle encoding in template only
* fixes#13131: add TestNG groups to all Typescript tests
* fixes#13131: old angular/typescript does not understand type imports
* Apply suggestions from code review
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
* fixes#13131: implement backwards-compatible behavior for format: 'date-time'
* fixes#13131: update typescript-angular integrationtests
* fixes#13131: review fixes + lots of documentation
* fixes#13131: update integrationtests
* fixes#13131: update docs/examples
* fixes#13131: update integrationtests
* fixes#13131: unify enums to union-types to make the api feel mora angular-ish
* fixes#13131: update examples
* fixes#13131: update docs/examples after merge of master
Co-authored-by: Christoph Linder <post@christoph-linder.ch>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
* Adds null checks to validation properties
* Modifies the templates to move validations into the cls
* Regnerates unit test spec
* Template update to get rid of cls factory for validations
* Updates samples for unit test spec
* Moves SchemaValidator class
* Removes SchemaValidator
* Fixes 2 tests in v3 sample
* Reverts version files
* Reverts 2 files
* Uses the same util to add all imports
* Removes unneeded class variable definition
* Samples regenerated for Groovy
* Fixes imports in Lua so object import does not show up
* Fixes nim imports
* Fixes proto generation
* Removes accidental new protobuf sample
* Improves proto allOf test
* Controls import addition with parametersAndResponsesImportFromV3SpecLocations
* More import protection in fromFormProperty
* More test fixes
* Samples regenerated
* Do not import composed schemas if those features are not supported
* Samples regenerated
* Adds new param importContainerType
* Fixes tests
* Samples regenerated
* Turns off importContainerType in JavaMicronautAbstractCodegen and regens samples
* Reverts most import changes, puts original imports behind a constant check
* Samples regenerated
* Updates model imports, samples regenerated
* Removes typeMapping and instantiationMap types from getImports
* Reverts template and regens samples
* Revers generator java files
* Stops setting complexType on codegenParameter
* Adds missing import back in
* Reverts languageSpecificPrimitives changes
* Samples regenerated
* Regnerates samples
* Reverts proto files
* Removes hoistParameterArrayItemBaseTypeHigher
* Samples regen
* Reverts parameter property
* Turns off importContainerType in getContent
* Samples regenerated
* Uncomments java test
* Adds imports for codegenParameter.schema
* Changes property name to importFromV3SpecLocations
* Changes property name to addSchemaImportsFromV3SpecLocations
* Removes unused java codes
* Fixes javadoc
* Removes extra docs file
* Add typescript-axios/with-separate-models-and-api-inheritance sample as test for #13203
* [typescript-axios] Add // @ts-ignore to imports in models if withSeparateModelsAndApi is set
* [typescript-axios] Update samples
* make python-flask set attributes via existing setter
* regenerate python-flask templates
Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-5-110.ap-southeast-2.compute.internal>
* Fixed regular expression in python client codegen
The previous regular expression was too loose, including any last character in the second group. This commit fixes that, making sure we only remove leading forward slashes, trailing forward slashes or trailing `\i`.
This commit closes 13069.
* Added generated files
* Edit comment
* Add test cases
Co-authored-by: antonio.silva <antonio.silva@feedzai.com>
* Bump jimschubert/query-tag-action from 1 to 2
Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)
Signed-off-by: dependabot[bot] <support@github.com>
* Use a normal variable name inside a function, no need to make it private.
* Pass on authentication names because authentication implementations may need those!
* Generate Petstore samples.
* Allow authentication implementations to apply header and query parameters asynchronously.
* Allow inherited implementations to define a type for authentication class.
* Generate Petstore sources.
* Remove `authNames` from API client and authentication classes.
* Reference properties with `this.` in case one of them has the same name as a local variable.
* Regenerate Petstore source code.
* Revert adding a generic T in `ApiClient`.
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* avro-schema generation fix for arrays with ref to enum (or any non primitive type) to include modelPackage prefix
* sample scenario and generated outputs for avro-schema
* create avro-schema dedicated test file