* 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
* 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