50 Commits

Author SHA1 Message Date
William Cheng
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
William Cheng
0bfa28f844 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-06 12:00:02 +08:00
William Cheng
c9047a6faa
[php] enhance type mapping (#10457)
* map BigDecimal to float

* enhance type mapping in php generators

* update tests

* update doc, samples

* remove primitive types from phpdt, mezzio
2021-09-25 12:09:34 +08:00
William Cheng
acd747ca6d Merge remote-tracking branch 'origin/master' into 6.0.x 2021-09-22 12:13:44 +08:00
Peter Leibiger
a558554961
Add OAS3 allowEmptyValue for query params (#10312)
* add the special case of empty query parameters to the fake API
2021-09-03 16:32:51 +08:00
William Cheng
0357b80f19 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-09-01 14:16:17 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
agilob
7edddb6531
Add map property in url params (#10154)
* Add map property in request params

* Regenerate samples to include map in url property
2021-08-17 18:31:53 +08:00
William Cheng
eaa76f8e1f Merge remote-tracking branch 'origin/master' into 6.0.x 2021-08-17 18:10:59 +08:00
William Cheng
764a462711 Merge remote-tracking branch 'origin/5.3.x' 2021-08-16 21:38:34 +08:00
William Cheng
8403e59aa0
Prepare 5.2.1 release (#10161)
* prepare for 5.2.1 release

* update samples
2021-08-16 19:08:29 +08:00
Nathan Baulch
ca5de9d503
[php] Deprecated annotation on operations and fields (#10085) 2021-08-04 17:29:19 +08:00
William Cheng
b799ca9ee0 Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-27 11:52:19 +08:00
William Cheng
56aafe30d9 Merge remote-tracking branch 'origin/master' into 5.3.x 2021-07-27 11:33:35 +08:00
Jon Jensen
bd070308d9
[Java][*] Annotate deprecated operations and schemas (#9478)
Refs #3358

Ensure `deprecated` operations are annotated/documented as such on the
generated methods. Libraries updated:
  * [feign]
  * [google-api-client]
  * [microprofile]
  * [okhttp-gson]
  * [resttemplate]
  * [retrofit]
  * [retrofit/play*]
  * [webclient]
  * [vertx]

Ensure `deprecated` schemas are annotated/documented as such on the
generated classes/fields. Libraries updated:
  * [feign]
  * [google-api-client]
  * [jersey2]
  * [microprofile]
  * [native]
  * [okhttp-gson]
  * [rest-assured]
  * [resteasy]
  * [resttemplate]
  * [retrofit*]
  * [webclient]
  * [vertx]

Also fix two minor bugs to get the java sample tests working:

* Fix an invalid jackson-datatype-threetenbp version number in vertx/pom.mustache
* Fix a bad return type in webclient/api_test.mustache when uniqueItems=true

Since this commit updates petstore-with-fake-endpoints-models-for-testing.yaml,
several other samples were updated, but it's just new files to reflect the
deprecated schemas, so there should be no consequential differences.

Relevant bits of the spec:

* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-operationdeprecated
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-schemadeprecated
2021-07-19 10:27:03 +08:00
William Cheng
05e4c3cf64 update samples 2021-07-12 17:15:22 +08:00
William Cheng
35f933b27f Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-12 17:11:35 +08:00
William Cheng
39fbf53150 create v5.3.0 2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 (#9922)
* bump verions to 5.2.1-SNAPSHOT

* update samples

* update readme

* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +08:00
Peter Leibiger
f7b93ebdf2
Update fake API to contain sample with binary body (#9610) 2021-05-29 10:26:01 +08:00
William Cheng
47483e60cb update version to 5.2.0-SNAPSHOT, update samples 2021-03-21 00:10:10 +08:00
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master (#9027)
* Prepare v5.1.1 in the master

* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release (#9017)
* prepare v5.1.0 release

* update samples (dart-dio-next)
2021-03-20 16:45:05 +08:00
William Cheng
3909505c5b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-13 23:26:43 +08:00
Jiri Kuncar
8cb4741248
[go][client] Fix example value for non string enums (#8900)
* [go][client] Fix example value for non string enums

* regenerated samples
2021-03-08 18:11:50 +08:00
William Cheng
d96197bcbd Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-03 16:19:20 +08:00
James Gilliland
f3c164d1ad
[PHP] Use a valid php type for maps (#8718)
* Use a valid php type for maps

* Convert type hint to correct format

Align map array format to that expected by phpdoc and associated tools.
2021-02-21 18:07:45 +08:00
William Cheng
4261252491 prepare 6.0.0 snapshot release 2020-12-21 16:39:40 +08:00
William Cheng
345b68a107 prepare 5.1.0 snapshot release 2020-12-21 16:35:12 +08:00
William Cheng
d7d5e53f2b
Prepare v5.0.0 release (#8247)
* update to 5.0.0

* update samples
2020-12-21 13:04:11 +08:00
William Cheng
0be3fe6104
Set skipFormModel to true by default (#8125)
* set skipFormModel to true by default

* update tests

* regenerate ruby faraday client

* remove inline object spec files

* more clean up on inline object files

* update samples
2020-12-18 23:57:19 +08:00
William Cheng
2578ef5e63
Prepare snapshot (v5.0.0) (#7986)
* Revert "prepare 5.0.0-beta3 release"

This reverts commit 3ebe774df37b43348bac1310a272de53a2d7040b.

* revert to snapshot

* update samples
2020-11-20 19:19:59 +08:00
William Cheng
2715f1371a
Prepare 5.0.0 beta3 (#7984)
* prepare 5.0.0-beta3 release

* update samples

* remove beta3 from readme
2020-11-20 15:18:58 +08:00
William Cheng
9377dbca56
Add "decimal" support (#7808)
* rename BigDecimal to decimal

* add isDecimal

* fix tests

* minor fixes

* fix mapping, update doc

* update test spec

* update c# samples
2020-11-02 21:31:32 +08:00
agilob
7318ff72d7
[Java][JVM] Move java specific import mappers to JVM specific code gen (#7569)
* Move java specific import mappers to java specific code gen

* Use JVM specific import mappers in kotlin, scala, groovy

* Update generators docs

* Add autogenerated files
2020-10-19 22:15:44 -04:00
William Cheng
2fd23f505e
Prepare 5.0.0-SNAPSHOT (#7347)
* Revert "Prepare 5.0.0-beta2 release (#7345)"

This reverts commit 212b4f784742744b7b238607dcefb23ec9db64d7.

* update readme
2020-09-04 15:31:54 +08:00
William Cheng
212b4f7847
Prepare 5.0.0-beta2 release (#7345)
* update version

* update doc

* update samples
2020-09-04 13:03:45 +08:00
Jim Schubert
a6d30cac9d
[core] Templating: limit compilation to supported extensions and constrain target paths (#6598) 2020-09-02 15:52:35 -04:00
Yuriy Belenko
9a03850828
[php] Exclude composer.lock in root gitignore (#7224)
* Add samples composer.lock to root .gitignore

composer.lock may produce CI errors when you need to test build against
different PHP versions. However users most likely want to commit this
file, so I think it's better to exclude it only in root .gitignore.

* Commit composer.lock in default PHP templates

* Refresh samples
2020-08-17 00:13:50 +08:00
Chris Tankersley
d433c2d42f
[php-laravel] Upgrade php-laravel to 7.x (#6346)
* Update laravel from 5.6 to 7.0

* Updated petstore example, removed missing files

* Updated PHP version to match composer.json

* Add samples generation config with OAS3 input spec

* Fixed gitignore compile errors, updated to newest petstore example

* Add composer.lock to .gitignore

* Fix generator gitignore location

* Add integration tests

* Refresh samples

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2020-06-30 12:22:32 +03:00
Yuriy Belenko
39eb32ec27
[php-laravel] Show required PHP version in docs (#6502)
* Add required PHP version to readme

* Add requried PHP version to @phpdoc
2020-05-31 23:02:35 +08:00
Jim Schubert
a47e522fae
[core] Refactor templating management (#6357)
* [core] Refactor templating management

This refactors template management to get logic out of DefaultGenerator
and to provide a cleaner API to template search and read/compile.

Deprecates MockDefaultGenerator, which is not a mock and causes
in-memory retention of file contents. Maintainers should prefer
executing a "dryRun" with new DefaultGenerator(true) or do true
mock/spies if evaluating template intermediaries is truly necessary.
Tests may read written files with lower overhead than the in-process
retention of those bytes.

This attempts to maintain some compatibility with existing templating
adapter interfaces. Any breaking change here would be unintentional but
minimal effort to retarget the new interface.

* Tests for dry run file outputs

* Update API usage in Meta, test TemplateManager

* Wait on lastModified, lookup by filename in SpringCodegenTest

* Test DefaultGenerator + ignore file

* Move config.processOpenAPI in DefaultGenerator

* Fix wrong use of libraries templateDirector (java)

The samples scripts for Java incorrectly referenced the libraries
directories directly rather than the upper-level Java directory. This
was incorrect usage of template directories, because the generator
expects to be given the "language" directory and perform a lookup for
missing templates in the order:

* user defined libraries directory
* user defined language root
* embedded libraries directory
* embedded language root
* _common directory

This is incorrect in our samples scripts because a user or maintainer
has the expectation that any template change to files at the Java/ root
should also be honored on generation if the script specifies a custom
template directory.

* Fix handlebars extension usage, clean up Meta tasks

HandlebarseEngineAdapter previously didn't handle files without
extensions in the same was as the MustacheEngineAdapter. This now allows
for files without extension (or dotfiles) to lookup in the same
location.

Meta tasks are cleaned up to use template manager only, rather than
attempting to create an "empty" generator to use the previous templating
specific methods.

* Update kotlin-multiplatform gradle wrapper

* Rename GraphQL .gitignore template

The .gitignore file is unable to load via classpath resource from the
graphql node server resource directory (for unknown reasons). Before
this change, the missing template would fail silently.

A .gitignore file may exist in other directories and load as expected.
Added a default .gitignore to _common as a fallback so as not to break
any custom generators which may also be failing silently.

* Log entire stacktrace in go sdk built by gradle in AppVeyor

* Rename PHP .gitignore to gitignore

Java resources may not load .gitignore, this follows suit with other
generators and uses "gitignore" (some use "gitignore.mustache").

* [php] Rename .gitignore templates to gitignore

* Use same classpath lookup in common locator

* [rust] Properly escape empty triple-braces

* [samples] Regenerate
2020-05-30 00:19:03 -04:00
Nathan Broadbent
78551d0180 Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables (#3266)
* 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
2019-07-06 22:21:41 +08:00
William Cheng
37c890f755
minor wording change (#2299) 2019-03-06 01:13:28 +08:00
Yuriy Belenko
e605882451 [PHP] Add gitignore to AbstractPhpCodegen (#765)
* [PHP] Remove PHP related rules from root gitignore

After conversation with @ackintosh we've agreed that every PHP codegen
should create it's own `.gitignore`. Client libraries(SDKs) should ignore
`composer.lock` file while server stubs better do opposite.

* [PHP] Set .gitignore as default supporting file

* [PHP] Add default gitignore to Client SDK

* [PHP] Add default gitignore to Laravel

* [PHP] Add default gitignore to Lumen

* [PHP] Add default gitignore to Silex

Seems like issue #663 and pull request #681 missed this security script,
I've changed output path in bin/security/silex-petstore-server.sh.

* [PHP] Update Slim

* [PHP] Add default gitignore to Symfony

I've copied few old rules from root gitignore to local one. These rules
should be reviewed by original SymfonyCodegen authors.

* [PHP] Add default gitignore to Zend

* [PHP] Refresh Openapi3 client samples

* [PHP] Add refs to .gitignore templates collection
2018-08-20 12:16:01 +08:00
William Cheng
c116c8fb9b
[PHP] Decommission "packagePath", add new option "packageName" (#681)
* remove packagePath from php file location, use -o instead

* fix php symfony top folder

* restore pacakgePath

* update php laraavel samples

* remove packagePath from PHP generator

* add new silex files

* update window batch - php silex

* fix openapi3 silex script
2018-08-06 18:10:34 +08:00
Akihito Nakano
2b429ee43b [PHP] [Laravel] Fix syntax errors in models (#721)
* Fix syntax errors in Models

* Update samples

./bin/php-laravel-petstore-server.sh
2018-08-03 10:44:12 +08:00
Christoph, René Pardon
f793ac25c7 feat (PHP LARAVEL) 8417: initial PHP-laravel codegen integration (#574)
* feat (PHP LARAVEL) 8417: initial PHP-laravel codegen integration

* feat (PHP LARAVEL) 8417: code review adjustments

* feat (PHP LARAVEL) 8417: fix typos; add missing files; adjust readme for those unfamilar with laravel to get started quickly

* feat (PHP LARAVEL) 8417: add sample petstore server

* feat (PHP LARAVEL) 8417: adjust route service provdider and model generation
2018-08-01 00:34:33 +08:00