14 Commits

Author SHA1 Message Date
William Cheng
dd6e8ccc3d
replace ~ with $user.home (#6985) 2020-07-18 17:07:03 +08:00
William Cheng
0707b4bb20
[Scala] setup Ivy cache directory (#6978)
* use ivy2 cache

* use ~/.ivy2 cache dir

* add pom.xml to openapi-generator-ignore

* update scala-akka sample

* use ~ for home directory
2020-07-18 15:48:47 +08:00
William Cheng
6abc4fdab2
Migrate all scala generators to use OAS3 (#6407)
* migrate all scala generators to use oas3

* add back pom.xml for scala-sttp

* skip form model in scalaz

* fix scala lagom tests

* add new files

* skip form models in scala finch petstore

* update samples
2020-05-25 23:09:34 +08:00
Aleksandr Nekrasov
5beccd12b6
[scala][templates] java 8 dates support (#5291)
* [scala][akka-http-client] java8 dates support

* scala-akka readme doc updated

* DateSerializers renamed

* rename serializers

* move date-library option to abstractScala

* generators docs updated

* enum defined for date libraries

* Backport to scala-http-client

* fix scala-akka-client date serializers

* fix typo in docs

* switch scala templates to java8 (jsr-310) date library by default

* update scala samples with java8 date library

* update scala generators docs with java8 default date library

* fix scala-play-server generator cli options as only java8 dateLibrary supported

* fix scalaz DateTimeCodecs template to support java8

* scalaz ci test againt java7 removed as it generate scala 2.11.8 client which is java8 based
2020-03-17 15:54:24 +08:00
Aleksandr Nekrasov
84250973be
[scala] strip model class name for all scala generators (#5439)
* stripped parameter enabled for all scala based generators

* scala samples updated

* docs generators updated

* fix scalatra. regenerated by openapi3 script.
manually removed enum default value from scalatra example due bug in schema extraction
2020-02-28 20:44:02 +08:00
Jim Schubert
25036e48d5
[scala] Support for Set when array has uniqueItems=true (#4926)
* [scala] Set support for unique arrays

This includes and builds upon community contribution for better Set support in Scala.
It makes property + model work as expected with Set and default values
across all Scala generators. Included tests to account for new changes.

This also reverts the community contribution to remove ListBuffer
imports and change the default for array to ListBuffer. Users should use
the instantiation types map to modify the desired array instantiation
type. Any new default should target a new minor release after community
discussion, as it affects all existing SDKs generated with
openapi-generator.

* [scala] Improve default handling of monadic collection type

* [scala] Regenerate samples

* Update ScalaPlayFrameworkServerCodegen.java

Scala Play defaulted to List and should continue to do so.

Co-authored-by: František Kocun <frantisek.kocun@gmail.com>
2020-01-05 09:20:56 -05:00
Jim Schubert
376e419d0b Support models with multi-level hierarchy (via roxspring) (#4503)
* Example of broken multi-level hierarchy

* Support for multiple levels of hierarchy in model objects

* Support for multiple levels of hierarchy in generators

* Regenerated samples

* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container

* Re-enable scalaz in verify samples

Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
2019-12-27 15:42:32 +08:00
Jim Schubert
10f17877f1
Fixes issues with Scalaz outputs (#4508)
Scalaz is not re-generated by users or CI (only verified), so some
compilation issues have been introduced into the generator.
Specifically, the generator previously didn't handle defaults well (or
even correctly, maybe?). This broke when array models were added to the
openapi document used to generate samples. The inclusion of Date-related
mappings being mapped to joda time in DefaultCodegen also caused some
issues with new DateTime properties on models.

Over the course of what appears to be Nov 10-17 2019, CircleCI seems to
be having intermittent issues with Scalaz verification. I found that
green builds were picking up SBT 0.13.x and failed builds were SBT
1.1.0. It's not clear where the system level SBT is being defined, but a
simple fix has been to enforce the sbt version in the generator.

For those unfamiliar with SBT; the SBT command acts as a launcher script
which may switch to older/newer versions of SBT. A Scala project invoked
with SBT 1.1.0 will look for an sbt.version override and happily attempt
compilation with the available SBT 1.1.0. The problem is that SBT 1.1.0
uses Scala 2.12 and this is not binary compatible with Scala 2.11. This
can cause issues with builds due to plugins or incompatible Java version.
2019-11-17 09:18:57 -05:00
William Cheng
4852434d13
update scalaz default value (#395) 2018-05-09 17:26:42 +08:00
Jérémie Bresson
059a3efe46 Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
Jérémie Bresson
7ecd5f3566
Rename "swagger" to "openapi" (#191)
* Rename ".swagger-codegen-ignore" to ".openapi-generator-ignore"
* Rename setGenerateSwaggerMetadata(Boolean) to setGenerateMetadata(Boolean)
* Rename Metadata Folder to .openapi-generator
2018-04-22 21:28:17 +02:00
William Cheng
3e0f959215
Update Scalaz petstore with OAS2, OAS3 (#163)
* update scalaz petstore with oas2

* update scalaz oas3 petstore (no diff)
2018-04-20 19:00:52 +08:00
wing328
62794c1d60 add scalaz to cirleci 2017-10-16 22:23:26 +08:00
Taylor Brown
488aa989bf Adding a new Scala client codegen (#6572)
* Adding a Scalaz codegen client

* Fixing imports and removing commented code

* Adding the bash file and updating the Pet store samples for Scalaz.

* Finalizing Scalaz generation so that it works for the Petstore.yaml

* Removing some unnecessary files and comments

* Removing some files that were accidentally generated for the wrong Scala
2017-10-16 22:07:57 +08:00