* Ensure CLI-level generator settings are available in additional properties
* Initial conversion to yaml configs
Configs prefix with 1- need to be manually evaluated.
* Add "other" configs not in ensure-up-to-date
* Add other/openapi3 files
* Cleanup all generation scripts
* Clean up: add missed configs and fix some openapi 3 diffs
* Move generate-samples script, error on batch failures
* Temporarily disable elm which requires skip validation of spec
* CI updates (todo: run all generators through appveyor or move to github workflows)
* Add success count to batch generation command output
* [samples] Regenerate
* Remove bin/windows
* Generate swift5 samples in bitrise
* Expand user input glob pattern
* Regenerate samples
* Update PR template
* Support config based generateAliasAsModel
* [samples] Regenerate
* [rust] Generate as alias for all samples configs
* [csharp] Move test staged file changes to in-directory
* Include "live" test files and ignore test cache files from samples.ci
* Remove concept of samples.ci staging
Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.
Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.
* Re-add meta generator scripts
* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines
* [csharp] Regenerate sample
* Set generateAliasAsModel CodegenConfigurator#toContext
This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.
* [rust] Regenerate samples
* Re-enable elm
* [java] Support OffsetDateTime example, fail ensures script on any generation error
* [samples] Regenerate
* Fix jersey2-java8 ignore file
* Fix elm spec validation
* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Set PHP 7.1.3 required version
I've tried to specify ^7.0 version at first, but main package which is
symfony/framework-bundle@v4.4.8 requires PHP ^7.1.3.
* Bump Symfony FrameworkBundle to ^4.4.8
Current Symfony Framework stable version is v5.0.8, but I guess it
requires significant codebase upgrade, so I've sticked with 4.4.8 which
shouldn't cause any breaking changes. Old requirement was ^3.3|^4.1
which compatible with 4.4.8.
* Bump PHPUnit version to ^7.0
PHPUnit 8.x version required PHP ^7.2, so I'm setting 7.x version to
support PHP 7.1.
There is new way to specify Kernel class, related PR:
https://github.com/symfony/symfony/pull/22668
* Bump PHP CS Fixer version to ^2.16.3
Configuration and all renamed rules fixed.
Config file renamed to .php_cs.dist as recommended in migration guide.
Migration guide from 1.x to 2.x:
https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/UPGRADE.md#config-file
* Remove PHP_CodeSniffer package
Second linter doesn't make sense. I think Symfony user would prefer
PHP CS Fixer over PHP_CodeSniffer because first one maintained by Symfony
members.
* Remove satooshi/php-coveralls package from Composer
This package is abandoned and Coveralls recommends to install it directly
in Travis-CI task script.
* Update Travic-CI config
I've changed test versions to PHP 7.1.3 and 7.2. PHPUnit generates
coverage report in report/logs/clover.xml file. Then PHP CS Fixer runs
with --dry-run option to not override anything just to show coding style
errors.
* Add basic Coveralls config
This is basic recommended config for a PHP based project.
* Add symfony/yaml package
This package was part of satooshi/php-coveralls, now it should be
defined as dev dependency.
* Do not commit composer.lock
I think committed composer.lock can cause CI errors while tests on fresh
installs are better.
* Remove confusing Ruby comment
* Fix return type in model setters.
Previously return type was same, as method arguments. It`s wrong, and cause errors like
"Return value of Foo::setSuccess() must be of the type bool, object returned"
We cant use self and current {{classname}} as return type, because that can break class inheritance. So, better remove type hint on setters, until PHP-devs dont make realization for return static
* Add return self type hint for setters
* Revert "Add return self type hint for setters"
This reverts commit 07dd9715
* Fix problem with clients, that put charset in content type header.
With this fix header "Content-Type: application/json; charset=utf-8" working same as "Content-Type: application/json" for parse input data
* Fix code style, add $consumes length check.
* Add isContentTypeAllowed static method and tests
* Fix old tests
Right now serializer doesn't support anything beside json and xml.
Call tests with application/json instead of form data.
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
* Set error_reporting(E_ALL) in phpunit.xml settings, so that undefined variables will always cause a test failure
* Update petstore sample for php-laravel
* Introduce GeneratorSettings + cleanup
GeneratorSettings is an immutable settings object, intended to limit the
manipulation of generator settings.
To move to GeneratorSettings, lots of modification was done to
CodegenConfigurator. The goal here is that CodegenConfigurator
would create the contextual information required to initiate a
generator run:
* GeneratorSettings
* Workflow related settings
* Configuring "system" GeneratorProperties (ThreadLocal properties)
* Deserializing from file to config object
* Input spec document (OpenAPI, intending to target others)
ClientOpts was generally unused, and the few places it was being used
have been updated to pass the properties to
codegen.additionalProperties.
* Add sanity to system properties
The -D argument for the generate command is an application argument
which is easily confused for Java System Properties. This isn't the
case, as setting values here doesn't update the configuration in
System.getProperties().
This adds a warning and deprecation to that option, as defining these
values as system properties will also continue to work as expected. This
makes the -D application argument redundant and confusing.
* Contextualize generator/workflow settings
This splits settings relevant to generator configuration (the what) and
workflow configuration (the how) in an attempt to make configuration
easier to conceptualize.
* Update Gradle task w/ CodegenConfigurator setters
* Remove -D usage in scripts
* Add -p option for additional properties
* Regnerate samples