Commit Graph

9 Commits

Author SHA1 Message Date
Jim Schubert
ac528aaf07
[test] Removes jmockit in favor of mockito (#5063)
* [test] Removes jmockit in favor of mockito

We use mockito in many tests. This removes jmockit which is run as a
javaagent in favor of Mockito which is not.

This work is in preparation for applying some static analysis tools,
while evaluating others such as Jacoco. I'm also look at ways to improve
build times while also decreasing "ramp up time" for contributions from
the community. Reducing the number of mock frameworks and dependencies
is a step toward that goal.

* Rename method in new.sh

* [cli] Mock the generate task
2020-01-22 18:04:00 -05:00
Richard Whitehouse
a4be2c0bb4 Remove -XX:MaxPermSize (#2712)
This was removed in JDK 8 and produces a warning
2019-04-23 11:34:01 +08:00
Vincent Devos
783f16fea6 [New Generator shell] improve gen_name parsing (#2565) 2019-04-05 22:01:06 -04:00
Jim Schubert
6fe9a52229 [feat][docs][website] Initial docusaurus based site (#1770)
* Iniital docusaurus based site

* Remove error about default local being used by String.format

* Change pinned users to represent global presence rather than alphabetical order pinning

* Include generator indexes in ensure-up-to-date (docusaurus site and /generators/README)

* Add Font Awesome attribution footer

* Remove feature callout until it is completed

* Include NPM try it out section

* Improve "Getting Started" type docs

* Include new custom template documentation

* Updating templating and customization docs

* Add vendor extension docs

* Cleanup templating page(s).

* Move users to yaml file for easy edit.

* travis configuration, and baseUrl mods to image URLs

* [docs] Migrate FAQ, release summary  from wiki

FAQ has been split into multiple smaller documents to better categorize
and allow users to find what they're looking for (in docs folder or in
new website).

Release summary information (versioning strategy and cadence) has been
migrated from the Wiki and clarified a bit.

Also adds copy button for all code snippets in website.

* Copy current contributing/code of conduct to website

* [docs] Creating a new generator
2019-01-18 17:39:33 +08:00
Jim Schubert
27426f7b52 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) 2018-05-23 05:41:19 +02:00
Jérémie Bresson
58f7a6f0c4 Fixes in new.sh (#398) 2018-05-09 18:21:13 +08:00
Jim Schubert
7cad47dd39 [kotlin-server] --library=ktor (barebones implementation) (#7412)
* [tools] Make sed in new.sh more cross-platform

The -r option passed to sed is a GNU sed option for extended regex
evaluation. The -E option evaluates the same option, and is part of the
POSIX standard, meaning this option is available in GNU sed as well as
Apple's BSD variant.

This commit removes the need for users to install gnu-sed on Mac.

* [ktor] Initial ktor (kotlin-server)

This adds a very barebones implementation for a ktor server generator.

This supports metrics and typed locations. All endpoins are stubbed to
return HTTP/1.1 501 Not Implemented.

* [ktor] Initial sample

* [ktor] Adding options for select feature installs

Options available:

* featureAutoHead
* featureConditionalHeaders
* featureHSTS
* featureCORS
* featureCompression

* [ktor] Start of auth functionality

* [ktor] API key auth placeholder

* Add basic support for oauth2 configurations

ktor doesn't seem to explicitly accept oauth flow properties in its
configuration object. This may be a blocker for 'implicit' flow
definitions.

* Added example response objects

* [ktor] Route for apis with bodies, some cleanup

ktor locations are only supported for routes with path/query parameters.
Routes with body or file parameters must be declared with traditional
route api.

This commit also includes lambdas for simplifying processing in
library-based server generator code. As an example, ktor requires
lowercase http methods while spring (a potential future generator)
would require an uppercase such as HttpMethod.GET. It doesn't make sense
to modify these in the operations post-process method because that
format wouldn't be universally desirable.

The lambdas included in the KotlinServerCodegen:
* lowercase: converts all text to lowercase
* uppercase: converts all text to UPPERCASE
* titlecase: converts words (with configurable delim) to Title Case
* indented|indented_8|indented_12|indented_16: these helpers apply the
  same desired indent to all lines of an included fragment's text.

* Fix some javadoc issues in lambda classes

* Update kotlin-server-petstore.bat

Change `kotlin` to `kotlin-server`

* Fix javadoc error messages in CI
2018-01-27 17:43:46 +08:00
Jim Schubert
23cf641e8a Kotlin client lists (#5729)
* [kotlin] array->List instead of Array

Serialization to/from primitive arrays can cause issues with valid
responses. This commit considers swagger 'array' types as 'List' which,
although not as memory efficient should provide a cleaner interface for
users (and avoid serialization issues).

Also, updates README.md to list new generator and excludes
folder at samples/client/kotlin/bin/, which is not used.

* [kotlin] Move sample under conventional directory

samples/client/kotlin/ -> samples/client/petstore/kotlin/

Updated new.sh to generate client/server/docs into similar structure.
Current documentation generators (cwiki, html, html.md, html2) aren't
following a convention like client/server generators.
2017-05-31 00:18:37 +08:00
Jim Schubert
d6a98fa444 Kotlin client (#5727)
* Add new.sh helper script to create generator files

* [kotlin] Initial Kotlin client generator

* [kotlin] Generate sample

* [kotlin] Sample helper files not needed for generation, but for sample evaluation
2017-05-30 00:38:15 +08:00