* 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
* bump apollo-datasource-rest to 3.6.1
* Fix RESTDataSource import
* fix ApiClient template
* fix parameters in callApi, add requestInit param
* change parameters to RESTDataSource convenience methods
* add .babelrc file, even in ES6
* simplify .babelrc... no need for all those fancy things, i think
* fix API test mustache template
* Update package.mustache
* add Set as a language-specific primitive
* Update JavascriptApolloClientCodegen.java
* make babel packages dev dependencies only
* Get inspiration from the main Javascript Generator 😖
* correctly get the basePath from spec
* fix basePath template reference
* Do not sanitize project description
Project descriptions are a multiline string — we just need to escape a few special characters (which we're already doing by invoking escapeText() on line 334)
* Fix module name when generating scoped package
If we set the project name to "@myorg/mypackage" (scoped package[1]), running `npm test` will fail, as it will generate faulty code.
[1] https://docs.npmjs.com/about-scopes
* 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
Faraday 0.16.0 added Faraday::FilePart as an alias to Faraday::UploadIO
and deprecated Faraday::UploadIO. In Faraday 2.0 the deprecated UploadIO
was removed.
Fixes: e12100b033c13b835fc3b3f1de159dc7f4634fc0
* [Ruby] Use Ruby autoload to lower memory usage and load times
Fixes#12648
Requiring all models up front can be very expensive in both time and
memory if there are many models. In an example client with 6000 models,
this would consume nearly 400MB of memory and take about 7 seconds to
load. This is mostly unnecessary as most users of the client library
will only actually use a small percentage of the library.
The changes in this commit use Ruby's autoload capability to defer the
loading until the constant is actually used. In that same example client
with 6000 models, when initially requiring the library, the memory
usage dropped to ~20MB and loaded in 0.3 seconds. As the constants are
loaded on-demand, the memory would increase towards that 400MB ceiling,
but if only a few constants are actually used, then memory will never
actually hit that ceiling.
An additional side effect of using Ruby's autoload is that the order of
declaring the constants is not important, as Ruby will naturally load
them in the correct order when they are needed. Thus, this commit obviates
PR #9103 and fixes#4690.
* add option to use autoload in ruby client
* test ruby clients only
* add tests
* update samples
* Revert "test ruby clients only"
This reverts commit 0aaf71cd4cc5d266f824b261a4d312f07bd589e5.
* update doc
Co-authored-by: Jason Frey <fryguy9@gmail.com>
* [Java] enum space value must not be generated as underscore
as this is invalid in Java 9
this closes#9607
* script changes
Co-authored-by: Sven Meier <sven@meiers.net>
* Move logic so that it can dynamically be influenced by opts
* Or should it be here?
* We handle the useInlineModelResolver logic in configureGeneratorProperties after processOpts
Co-authored-by: Westerlaken, H.L. (Laurens) <laurens.westerlaken@devolksbank.nl>
* Adds requiredVarsMap
* Fixes imports
* Adds requiredVarsMap to CodegenParameter
* Updates CodegenResponse
* Adds feature to codegenModel
* Fixes codegenProperty
* Switches to getRequiredVarsMap
* Uses curly braces for set definition
* Added blocked examples back n to test spec now that the required bug is fixed
* Sample regenerated
* Handles escaping required property names
* Fixes CI tests
* Samples regenerated
* Samples regnerated
* Fixes test
* fix: [JAVA/SPRING] [#12692] fixed optional config property legacyDiscriminatorBehavior always being overwritten to false in spring codegen
* feat: [JAVA/SPRING] [#12692] spaces instead of tabs
* feat: [JAVA/SPRING] [#12692] spaces instead of tabs in test
* fix: [JAVA/SPRING] [#12692] added comment
* fix: [JAVA/SPRING] [#12692] spaces instead of tabs
* fix: [JAVA/SPRING] [#12692] spaces instead of tabs in test