Commit Graph

10788 Commits

Author SHA1 Message Date
Christophe Bornet
d2016d8e0a Fix spring controller validation (#225) 2018-06-12 20:45:17 +08:00
Jérémie Bresson
defedf6e2b
Mention new branches in the doc pages (#287)
* Mention new branches in docs
* Add badges for new branches in README.md
* Allow branches "3.1.x" and "4.0.x" to deploy (.travis.yaml)
2018-06-12 12:05:32 +02:00
Jérémie Bresson
8ae1c814d5 Prepare 3.0.2-SNAPSHOT (#285)
Set version `3.0.2-SNAPSHOT`.

Follow up from #280
2018-06-11 13:22:03 -04:00
William Cheng
0453e64fa6 Prepare 3.0.1 release (#280)
* add new bash script for release version update

* update version using the bash script

* Fix shippable build

Modify `artifactId` of `CI/pom.xml.shippable` to be `openapi-generator-shippable-pom`

* Comment ensure-up-to-date

* add shippable to the release script

* Updates README based on new release changes (#271)

The release management changes moved from maven-publish (newer plugin)
to maven (older plugin, only one that works currently with signing).
This updates docs in the samples/local-spec project with current
directions.

Also:

* Includes sonatype releases/snapshots on repo lookup
* Adds openApiGeneratorVersion property
2018-06-11 10:32:15 -04:00
Esteban Marin
0a479f77f6 [typescript-angular] strict type checking (#218)
* strict type checking

* strict type checking

* generate samples for angular-typescript
2018-06-11 21:31:23 +08:00
Akihito Nakano
2392a09eeb [C++ server] Adjust the names (script, sample folder, generator) to lang option (#250)
* Renamce C++ server scripts

* Change output folder

* Rename sample folder: pistache-server -> cpp-pistache

* Rename sample folder: restbed -> cpp-restbed
2018-06-10 22:48:30 +08:00
sunn
f5f00069bd Removed warnings for packages included in SDK for Net Core 2.0 (#269)
Microsoft.Extensions.SecretManager.Tools
Microsoft.DotNet.Watcher.Tools

For docker containerized apps, avoiding restore again is important for image size
2018-06-10 08:29:13 -04:00
Jim Schubert
640fd87e3b [cli] Completions command for suggestions (#213)
* [cli] Completions command for suggestions

This takes airlift's 'suggest' command and reuses it as a different
command name, 'completion'. This gives us in-built CLI completions which
are useful in the repo-level container's docker-entrypoint.sh. This
previously parsed Java files for conventional usage of Command
annotations, which is potentially buggy. The new implementation relies
only on CLI to provide command completion suggestions.

As part of this, we can prepare for bash completion scripts which can be
added to our homebrew formula.  The new completion command will also
complete on command options, for example:

cli completion generate

This will provide all short and long form switches available to the
generate command.

* Add piggyback license onto licensed of file borrowed from airlift/airline
2018-06-10 19:33:00 +08:00
SiMing Weng
43b60e667e [Java][RestTemplate] Fix query parameter URL encoding (#260)
* add URL encoding to the query parameters in case they have unsafe characters

* add comment

* update generated samples
2018-06-10 17:48:26 +08:00
sunn
a2c27ba8a6 [cpp-qt5] Remove std::shared_ptr from Qt5 (#267)
* Remove std::shared_ptr from Qt5
Updated Petstore
Update Object Template to be able to store the json body

* Remove tabs
2018-06-10 17:39:38 +08:00
Johannes Hoppe
f5708218ea Adds some links to the README (#261)
* Update README.md

links to both articles and our consulting company @wing328

FYI @fmalcher

* Update README.md

company-link in alphabetical order, as suggested by @wing328
2018-06-10 14:19:17 +08:00
Jim Schubert
276afefc85 Update sec.gpg.enc to binary encoded secret
Previous attempts at ecrypted secret failed due to improperly encoded
file. Local tests revealed that sonatype creds weren't configured
correctly for the defined server. Maven and Gradle snapshots uploaded
locally using updated configs.
2018-06-09 23:03:44 -04:00
Jim Schubert
36d1ec364e Add gpg --check-trustdb, limit gpg to master
This adds gpg --check-trustdb to avoid:
   gpg: keydb_search failed: invalid packet

This also limits gpg key maintenance to master branch.
2018-06-09 20:53:26 -04:00
Jim Schubert
dbbeffa712 Re-do encrypted gpg and reference in settings.xml 2018-06-09 19:42:51 -04:00
Jim Schubert
0adfd9f8e9 Fix trailing semicolons in after_success Travis CI scripts 2018-06-09 17:11:15 -04:00
Jim Schubert
178949038f Use ubuntu keyserver instead of mit (due to timeout) 2018-06-09 14:36:17 -04:00
Jim Schubert
5a332f3c57
[gradle] Plugin release management (#201)
* [gradle] Plugin release management

This applies steps necessary for publishing to Sonatype, including
sources, javadoc, jar and signing. Also includes full POM details, per
Sonatype requirements.

* Properties placeholders in gradle plugin (should allow users without these settings to build locally)
* Update build wrapper for install task to be used with new maven plugin, not maven-publish plugin
* Add code signing for gradle and maven
2018-06-09 14:21:31 -04:00
Johannes Hoppe
f72059e7ac Updates small typo in qna.md (#262)
-was +were
2018-06-09 09:21:44 -04:00
Jérémie Bresson
992afd51eb
Fix ModelUtils.getUnusedSchema() (#253)
Fix #252

`ModelUtils.getUnusedSchema()` consider Schemas referenced in other Schemas. Implemented for:

* array
* object
* maps
* ComposedSchema
  - oneOf
  - anyOf
  - allOf
* not
2018-06-09 11:56:08 +02:00
Jérémie Bresson
8de5c62cf2
Add JaxRS to bin/ensure-up-to-date (#248)
* Create bin/java-jaxrs-petstore-server-all.sh
* Run bin/java-jaxrs-petstore-server-all.sh
* Add 'bin/java-jaxrs-petstore-server-all.sh' to 'bin/ensure-up-to-date'
2018-06-09 08:54:27 +02:00
Matteo Mazza
ebaa7021a4 feat(security): add cookie-auth support (#240) 2018-06-09 00:20:40 +08:00
Jérémie Bresson
51437af1cd Add 'unblu inc.' to company list (#246) 2018-06-07 22:12:03 +08:00
William Cheng
c45dba1691
put company list in alphabetical order (#244) 2018-06-07 18:27:27 +08:00
William Cheng
fbe9626b7e [jaxrs-spec] generate spec file (yaml) correctly (#243)
Fix #235
2018-06-07 11:08:52 +02:00
Akihito Nakano
cf657f1c7b [C++] Adjust the names (script, sample folder, generator) to lang option (#220)
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder: qt5cpp -> cpp-qt5

* Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh

* Rename sample folder: cpprest -> cpp-restsdk

* Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen

* Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh

* Rename sample folder: tizen -> cpp-tizen

* Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder(security): qt5cpp -> cpp-qt5

* Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat

* Change sample folder

* Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat

* Change sample folder

* Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat

* Change sample folder

* Change output folder: tizen -> cpp-tizen

* Rename the scripts under bin/openapi3

cpp-restsdk is not exist under bin/openapi3

* Change sample folder
2018-06-07 16:55:43 +08:00
Akihito Nakano
f65193e6fb Add GMO Pepabo to company list (#242) 2018-06-07 16:45:23 +08:00
Christophe Bornet
7a1945e154 [Spring] Add apiFirst option (#184)
* [Spring] Add apiFirst option

* Git diff to see what's wrong

* Git diff to see what's wrong

* Update bin/ensure-up-to-date

* Run bin/ensure-up-to-date
2018-06-07 13:55:12 +08:00
Jim Schubert
f4c66d9e53 [cli] Write to stdout/stderr, allow redirection (#207)
* [cli] Write to stdout/stderr, allow redirection

Previously, slf4j-simple from generator core was being used. This writes
to only a single stream (STDERR) and is confusing from a CLI tooling
perspective.

This consumes logback in CLI, and excludes core's slf4j-simple
dependency. This allows us to define multiple appenders, one for STDOUT
and one for STDERR.

WARN messages and lower are written to STDOUT. ERROR is written to
STDERR.

* [cli] Limit logs to match prev implementation

* Remove slf4j-simple from core project, to avoid conflicts with consumer logger implementations
2018-06-07 12:45:03 +08:00
Ben Mordue
0fb1ffa88b [JAVA][Client] New object instead of null for empty POST request (#98)
new Object() for empty request body
2018-06-07 06:37:37 +02:00
Jérémie Bresson
69a3852ef7
Make yaml serialization deterministic (#233) 2018-06-06 11:47:13 +02:00
Esteban Marin
d649c1311e Add syntax highlighting to migration guide (#237) 2018-06-06 11:38:07 +02:00
William Cheng
f7eacbb0c5 Fix shippable badge (#232) 2018-06-06 08:06:00 +02:00
Esteban Marin
3e928fff2d update company list (#227) 2018-06-06 10:57:54 +08:00
Stephane Carrez
967cc5bd3b Fix #210: [Ada] Update the code generator for required and optional parameters (#211)
- Do not check for required parameter in getTypeDeclaration()
- Update the nullableTypeMapping map to map an Ada type into a corresponding
  Nullable_<T> Ada type that allows the value to be null
- Check for optional parameter in postProccessOperations() and postProcessModels()
  to replace the Ada type into an Ada type that supports null values
2018-06-05 23:04:39 +08:00
Akihito Nakano
b8f1e5afa1 Delete unused methods in DefaultCodegen (#209) 2018-06-05 23:02:14 +08:00
Esteban Marin
fe04a0e347 add note about maven plugins (#216)
* add note about maven plugins

* add new section

* fix section link

* fix links
2018-06-05 22:24:55 +08:00
Esteban Marin
0e4d3e7815 add raiffeisen to company list (#223) 2018-06-05 21:32:24 +08:00
William Cheng
e631c16b96
add a remark about homebrew installatio (#217) 2018-06-05 19:16:31 +08:00
Jérémie Bresson
501245d0c2 Fix javadoc in clioption (#188)
* Fix javadoc warning

* Update 'maven-javadoc-plugin' to 3.0.1
2018-06-04 00:32:54 +08:00
Jérémie Bresson
df55ab3efb Build improvements (#202)
* Set "openapi-generator-maven-plugin" version to 3.0.0

* Disable maven-install-plugin in "openapi-generator-gradle-plugin"

* Changes to the maven wrapper for openapi-generator-gradle-plugin

* Remove deploy-file that does not work
2018-06-02 21:06:37 -04:00
Jérémie Bresson
1e5e1d4458 Prepare 3.0.1-SNAPSHOT (#195)
* Restore version to 3.0.0-SNAPSHOT

* Set version to 3.0.1-SNAPSHOT

* Run ensure-up-to-date

* Remove duplicated version declaration
2018-06-02 10:57:33 +08:00
William Cheng
9c82520637 update docker file to use stable JAR 2018-06-01 15:48:15 +08:00
William Cheng
aea08fe76e
Remove SNAPSHOT version from online generator 2018-06-01 15:03:32 +08:00
William Cheng
746bb06a2a
Release version 3.0.0 (#190)
* update release version to 3.0.0

* comment out ensure-up-to-date during the release

* add release note

* clean up

* clean up links

* add release note for 3.0.0

* update release note

* update release note

* update version for gradle plugin before release
2018-06-01 10:58:16 +08:00
Jim Schubert
b6b8c0db87 [gradle-plugin] Initial implementation (#162)
* [gradle-plugin] Initial commit

* Clarify comments on file constraints

When a user sets the models, apis, or supportingFiles environment
variables, any one of these being set disables generation for the other
two.  This could be confusing to users, so I've added some clarification
text in the comments for these properties.

In addition, I've cleaned up the extension on
Property.ifNotEmpty, to avoid using Suppress annotations where it's not
necessary. The change creates a local variable of type T?, allowing
Kotlin to track the variable's nullable state at compile time.

* Move gradle plugin under modules

* Move kt files under kotlin source set. Add sample.

* [gradle] map-like options as maps

* Add tests for gradle validate task

* Apply gradle plugin to mvn install phase

* [gradle] Testing remaining gradle tasks

* Add gradle plugin to the integration doc

* Update gradle plugin README with task options

* Gradle readme formatting
2018-05-31 19:23:05 +08:00
Jan Prieser
7dfd940023 Docker: use correct MAVEN_CONFIG (#182)
the variable wasn't used correctly. i always fell back to use `.` as homedir.
2018-05-30 18:56:08 -04:00
Thibault Duperron
bd50d368eb [JAVA - jaxrs-reasteasy-eap] Add import to models (#179)
Call super management for managing imports in postProcessModelProperty
2018-05-30 07:35:52 +02:00
William Cheng
ad5d5f598e
Add TOC and a new section in the migration guide (#174) 2018-05-29 19:29:54 +08:00
William Cheng
31b9362433
Re-enable go test in CircleCI (#173) 2018-05-29 19:29:31 +08:00
Jim Schubert
f042132857 Cli error message improvements (#172)
* Errors in Generate/Validate print to stderr/exit 1

Generate and Validate exposed exceptions rather than user-friendly
messages when an error occurred. In generate, this could happen for
numerous reasons, but the most likely is a user typing (or guessing) an
invalid generator name. In Validate, an error was exposed if there were
any validation errors in a spec.

New behavior:

* Generate now exposes a typed exception when a generator cannot be
  loaded by name. This allows consistent messaging for load failures.
* Generate now presents guidance on failure (check the spelling and try
  again). This is purely a usability improvement.
* Validate now writes validation errors to stderr and exits with code 1.

* Improve err messages: config-help/required opts.

config-help now presents same error for invalid generator names as the
'generate' command.

Options which are required, and those which require a value, now present
a user-friendly hint at the error and exit with code 1 (rather than an
uncaught exception).

* Log missing -g error to stderr rather than LOGGER
2018-05-29 18:36:26 +08:00