Commit Graph

335 Commits

Author SHA1 Message Date
William Cheng
9182784955 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-08-28 14:01:20 +08:00
Jérémie Bresson
60e4c923dd [java][client] Add a "serializationLibrary" option (#3759)
* [java][client] Add a "serializationLibrary" option

* Update docs
2019-08-28 09:54:24 +08:00
Josh Giles
158cdfeb3c [typescript-fetch] fix #1998: prefix req ifaces. (#3740)
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
2019-08-23 16:58:51 +02:00
William Cheng
8741a8ca35
Minor enhancements to the Avro schema generator (#3728)
* minor enhancements to the avro generator

* add option to customize package name

* update doc
2019-08-22 16:06:04 +08:00
Josh Giles
b323b0a0af [typescript-fetch] Fix #1998: namespace reqs. (#3695)
* [typescript-fetch] Fix #1998: namespace reqs.

Fix #1998 by namespacing the generated request object types used in the
typescript-fetch client codegen.

* Update petstore samples.

* Add default-false namespacing config option.

* Re-run code sample generation.

* Add maven build configurations.

* Fix sample VERSION files.

* Update typescript-fetch docs.

* Emulate with-npm-version, adding package.json.

* Add Paxos to companies using.

* Prefix namespace with basename to avoid collisions.
2019-08-22 07:59:34 +02:00
William Cheng
d09e097e4e
update qna with more info on nullable (#3726) 2019-08-22 11:39:57 +08:00
Sai Giridhar P
6924b3c710 [csharp-netcore] Making HTTP response headers dictionary case-insensitive (#3707)
* fix(csharp-netcore): Making response headers case-insensitive

* fix(r): Adding response headers on docs
2019-08-21 21:20:05 +08:00
Sai Giridhar P
94eb6860aa [csharp-netcore]: Fixing the build issues (#3681)
* fix(csharp-netcore): Fixing the build issues

* fix(csharp-netcore): Fixing the build issues

* fix(csharp-netcore): Fixing the Pet project

* fix(csharp-netcore): help fixes
2019-08-21 18:18:58 +08:00
Esteban Gehring
e5912b4925
typescript-angular: set angular version 8 as default for ngVersion (#3680)
* set angular version 8 as default for ngVersion

* docs
2019-08-20 07:48:29 +02:00
William Cheng
4575b3074a
[Go] add option to use class as enum prefix (#3675)
* add option to use class as enum prefix

* update doc

* fix go test

* update go xml petstore

* fix format
2019-08-20 00:33:08 +08:00
William Cheng
fae0528cd5
update cli option in Dart (#3627) 2019-08-13 17:13:50 +08:00
Jim Schubert
a5349cfde5
[cli][gradle] filter deprecated generators by default when listing available generators (#3612)
* Filter deprecated generators from CLI list by default.
* [gradle] Exclude deprecated generators from list by default, add "include" option to allow for customization of list task.
* Update scripts to support the --include option of the list command
* Update gradle/cli docs for generators listing with "include" option.
2019-08-12 08:25:52 -04:00
Jim Schubert
06533b977c
[core][gradle] User-defined server variable substitutions (#3363)
* [core] Initial support for server variable overrides
* [gradle] Support user overrides for serverVariables
* [core] Clarify server variable overrides, and propagate them to templates in the "servers" array
2019-08-11 09:57:36 -04:00
William Cheng
2d7cc778db
Add a new NodeJS Express server generator (#3567)
* create nodejs express esrver

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet (#2839)

* Working Express server with successful routing to controllers.

* rewrote controllers and services. Haven't tested yet

* controllers and services have passed tests successfully

* Added documentation

* Added documentation

* Support for openApi v3, using 'express-openapi-validator' for parsing and validation, and an internal router to pass arguments to controllers and services. /controllers/Pet.js and /services/PetService.js should be used for reverse engineering for future codegen script

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* some updates to adapt to changes in the generator (removing references to swager); some work on handling file uploads; some work on tests

* Update NodeJS server generator and templates based on new output (#3261)

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* update doc

* Changed routing code to follow the following convention:
Each path operation has a 'x-openapi-router-controller' and 'x-openapi-router-service'. Automated files will be placed under /controllers and /services respectively.
Controller file names will end with 'Controller.js'.
Removed swaggerRouter, replaced it with openapiRouter
Routing works and simple tests show a return of 200 to requests.

* [nodejs-express-server] various updates, fixes (#3319)

* various fix

* remove dot from service

* add space

* better method empty argument

* remove test service (#3379)

* add new doc

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData
2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData (#3442)

2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* added model classes. Currently as a concept only. Seems like won't be in use

* Updated README.md to be a detailed description of the project.
Removed test files that are not needed.
Removed utils/writer.js which is not needed, and the references to it in the codegen files

* Removed redundant file app.js - this file has no benefit at this point. index.js now calls ExpressServer.js directly. Updated files that used to call app.js. Updated README.md accordingly
Added a path to call the openapi.yaml, and a test file for all endpoints that are not in the openapi.yaml, ensuring that they return 200. Updated README.md accordingly

* Remove test controller (#3575)

* remove test controller

* add back changes to templates

* remove app.js

* update wording
2019-08-09 00:30:47 +08:00
William Cheng
eca8ec3cf8 update doc 2019-08-01 15:58:45 +08:00
Dennis Kliban
bcc3a9ecf7 Ruby client faraday (#3405)
* WIP: add faraday support to Ruby client

* update samples

* bin/console

* https only

* ruby-faraday: Add a gemspec template for faraday

* Add a test for ruby-faraday client options

* Remove Gemfile.lock from ruby-client-faraday

* Implement faraday client

* Problem: can't use Faraday library for ruby clients

Solution: add support for Faraday library

This patch builds on the work started by @meganemura

* Problem: Faraday is set as default library

Solution: Make Typhoeus default

This patch also updates the api_client template for Faraday to include query params with requests.
2019-08-01 11:08:34 +08:00
Erik Seliger
0e621dcc29 feat(typescript-angular): add flag for using string enums (#3464)
* feat(typescript): add flag for using string enums

* fix: adjust templates

* fix: repair logic

* fix: remove sample

* fix: add to v7 sample

* fix: remove unneeded lines
2019-07-31 21:16:49 +02:00
Michal Foksa
37cdc8e493 Feature/mustache lambda documentation (#3476)
* Default outputFile value is `openapi/openapi.yaml`.

* Mustache Lambdas documentation.

* Default OpenAPIYamlGenerator outputFile value is `openapi/openapi.yaml`.
2019-07-29 15:34:50 +02:00
William Cheng
6e3176557c
[OCaml] various enhancements (#3483)
* add ocaml template creator

* various enhancement to ocaml generator

* update instruction

* update doc

* remove readme

* add back readme
2019-07-29 10:07:32 +08:00
cgensoul
1713c7610d [OCaml] new client generator (#3446)
* Début d'un générateur pour OCaml.

* Ajout du script bash de generation pour OCaml.

* Implémentation de la partie model du générateur OCaml.

* Suppression du fichier Model.mustache.

* Légère modification dans le générateur OCaml.

* Début d'implémentation de la génération des opérations.

* Avancées dans l'implémenatation des opérations.

* Avancée dans la gestion des enums : reste à traiter le fait que Yojson sérialize les variants comme des tableaux JSON.

* Prise en compte du fait que Yojson représente les variants constants sous forme d'un tableau JSON contenant une unique string.

* Utilisation des variants polymorphe pour les enums car il se peut que plusieurs énumérations partagent des valeurs communes ce que ne permettent pas les variants ordinaires au sein d'un même module.

* Avancées dans le générateur de code OCaml : le code produit compile et prendre en compte les pathParams, les queryParams, les headersParams, les bodyParams et la réponse JSON. Manque le support du multipart, du form encoded et des mécanismes d'authentification.

* More tests.

* Correction de problèmes dans la génération mis en évidence par l'utilisation d'un fichier OAS plus gros et complexe que Petstore.

* Mapping du case Error de Ppx_deriving_yojson_runtime.ok_error vers l'exception Failure pour avoir des types plus simples et non dépendants de Pppx_deriving_yoson_runtime dans les APIs générées.

* Ajout de la génération des fichiers d'interfaces .mli pour les APIs.

* Ajout du support des parametres de type x-www-form-urlencoded.

* Le paramètres d'url de type number étaient mal gérés.

* Cleanup.

* Replace block comment start and end sequences in input text.

* Make apis calls without a return type return unit rather than Yojson.Safe.t.

* Make modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml generate properly.

* Added generated code for modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Better handling of enums and map container and better sanitizing of generated identifiers to support all the corner cases present in modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Correcting a violation : using toLowerCase without relying on the default Locale.

* Changed authoring in partial_header.mustache.

* Deleted commented code.

* Collect enum schemas in items properties of operation parameters in the case of ArraySchema parameters. This allows correct processing of modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Collect enums also in additional properties schemas of operation parameters in the case of MapSchema parameters (if this type of parameter can is allowed).

* Removed copy-pasted Copyright notice from SmartBear.

* update doc

* Use Locale.ROOT instead of Locale.ENGLISH for toLowerCase calls.

* Make GET operations with body generate compilable code.

* Updated ocaml-client generated samples using the latest version of the OCaml code generator.

* Added [@default None] for record fields with option types so that if those fields are missing at deserialization time, None is assumed.

* Added support of api keys in query params.

* Updated generated ocaml samples to reflect latest changes in templates.

* Added [@default] on enum record fields for which the enum type has only one accepted value so that those fields can be deserialized even if the value is absent of the json payload.

* Delete useless space character in template.

* Added proper handling of http response codes.

* Updated generated ocaml samples to reflect latest changes in templates.
2019-07-28 21:50:53 +08:00
Benjamin Douglas
43590582c5 Java 11 native HTTP client library (#3434)
* Initial commit of Java 11 native HTTP client port

* Rebase to master and add JSR305 for @Nullable

* Update samples with @Nullable annotations
2019-07-26 09:59:21 +08:00
Martin Delille
3f3ecb6879 add modelNamePrefix option for qt5 (#3431)
* qt5: Remove duplicate cppNamespace additional property

* qt5: Add modelNamePrefix additional property
2019-07-25 09:23:51 +02:00
Akihito Nakano
1e735c69fa Add Logs section to the Debugging page. (#3357) 2019-07-18 15:04:27 +09:00
Jean-François Côté
610ca28681 Fix #3349 : [typescript-fetch] Proposition to follow spec (#3351)
* Fix 3349 : Proposition to follow spec closely

* Fix #3349 : Changes suggested by code review. Add an option for the single request parameter.

* Fix #3349 : Add sample with the use of the single request parameter

* Fix #3349 : Small fix that wasn't passing the tests

* Fix #3349 : Remove cariage return that might create an error

* Fix #3349 : Add chmod to make new sh file executable and fix the CircleCI issue

* Fix #3349 : Add windows sample generation

* Fix #3349 : Rename everything because of default value change

* Fix #3349 : Indentation fix

* Fix #3349 : Add 755 to typescript-fetch-petstore-multiple-parameters.sh

* Fix #3349 : Auto generation of the documentations

* Fix #3349 : Revert back a change that was auto-generated.
2019-07-17 22:30:27 +02:00
Jérémie Bresson
41d5750ddb [JaxRS-Spec] add openApiSpecFileLocation parameter (#3344)
* [JaxRS-Spec] add openApiSpecFileLocation parameter

* Update samples
2019-07-14 18:06:44 +08:00
William Cheng
a5f92ad150 update doc 2019-07-13 01:20:15 +08:00
William Cheng
203fc812bd
v4.0.3 release (#3315)
* update snapshot version

* update doc

* comment out haskell servant server test
2019-07-09 20:44:31 +08:00
Victor Orlovsky
0e37719162 [Java][Rest-assured] Bump rest-assured version (#3282)
* Update rest-assured version to 4.0.0

* Added rest-assured version 4.0.0 to documentation

* Remove CatAllOfTest and DogAllOfTest
2019-07-08 22:20:35 +08:00
Jim Schubert
51e7005373
[online] Remove GENERATOR_HOST defaults (#3289)
The defaults configured for GENERATOR_HOST didn't really make sense.
When running the docker container with `-P`, GENERATOR_HOST defaulted to
http://localhost. This caused download links for generated client/server
code to be incorrect. For most cases, there's no reason to provide
GENERATOR_HOST as the code already figures the appropriate
scheme/host/port from the originating request.

GENERATOR_HOST could still be used for more complex deployment
scenarios, for instance if a specific server is configured as a file
server. I haven't tested this scenario, and it may require mounting /tmp
as a volume when running within a container.
2019-07-07 10:25:43 -04:00
Erik Timmers
366ca24062 Add option to disable default interfaces (#3022) 2019-07-07 16:44:03 +08:00
Justin Black
109808e60d [Python] Adds new client generator, python-experimental (#3244)
* Adds python-experimental generator

* Adds python-experimental samples folder which uses its own v2 spec

* Adds enusre-up-to-date updates

* Removes samples/client/petstore/perl/t/AnotherFakeApiTest.t

* Removes comment line from python-experimental generator

* Reverts perl docs file

* Updates perl sample client

* Adds python-experimental to pom.xml

* Copies the python test foldeers tests and testfiles into python-experimental

* Copies python test folder into python-experimental

* Moves python testing from Travis (samples pom.xml profile) to Circlci (samples.circleci pom.xml profile)

* Adds python-experimental pom.xml

* Adds python-experimental makefile and .sh files

* Chenges python-experimental to use gitignored venv rather than .venv which is not ignored when testing

* Adds dev-requiremnts.txt and removes .travis.yml from python-experimental so CI tests will pass

* Moves python-experimental from CicleCI to Travis to get support for multiple python environments

* Updates generator java comment so CI tests will run over again
2019-07-06 22:43:29 +08:00
William Cheng
0b79c5b6be
Add new Go client (experimental) generator (#3268)
* add new go experimental generator

* extends go client codegen

* add go samples and test

* comment out haskell client test
2019-07-04 22:56:49 +08:00
William Cheng
1e380850c0 update doc 2019-07-04 22:49:15 +08:00
Matthew Cachia
cbca86b43a Add unhandledException to 'spring' generator, which declares all operation methods to throw a generic exception, allowing implementations to unhandle checked exceptions. This is useful whenever it is unnecessary to handle specific exceptions and, more importantly, allow generic constructs (eg. Spring @ControllerAdvice) to tackle unhandled exceptions from a single point (for instance, tackle all unhandled exceptions as an HTTP500 while excluding the stacktrace in the response body). (#2482) 2019-07-04 20:19:40 +08:00
Ramanth Addala
0cb921251d feat(r): Added handling exception with ApiException class and better documentation (#3217)
* feat(r): Added handling exception with ApiException class and document generation

* feat(r):enhancements to exception handling and documentation

* fix(r): fixes and reverting the man folder

* fix(r): minor fix of import statement

* fix(r): generated the docs file

* fix(r) minor doc casing fixes
2019-07-03 22:05:21 +08:00
William Cheng
4e62e92daf update doc 2019-07-02 17:17:57 +08:00
Jan Willem Harmelink
c012dcd754 Added RxJava2 to java-vertx server codegen. (#3240) 2019-07-02 16:46:02 +08:00
Roman Müller
73966a0152 [KOTLIN Spring] add interfaceOnly option (#3050)
* move template definition to processOpts()

* add interfaceOnly option for kotlin-spring

* add template for interface only option
2019-06-27 12:23:50 -04:00
wing328
6c9fefa7b5 update doc 2019-06-27 10:47:05 +08:00
Amit Joshi
94c583b6ce [aspnetcore]: Preliminary support for ASP.NET 3.0 Core preview 5 (#2824)
* First set of fixes to support ver 3.0, useswashbuckle does not work yet

* Fix swashbuckle issues iwth aspnetcore 3.0

* Use default routing for 2.2 and turn off default for 3.0

* fix up documentation

* PR Feedback and wrong name in mustache file

* Fix for 2.1 usage too

* Change isFramework to useFrameworkReference as name to make thngs explicitly clear. Also fix small messages for the review comments

* Make JSON.NET version configurable

* Activate endpoint routing and use camel case NamingStrategy

* Make Newtonsoft version configurable to match ASP.NET Core preview 5

* Fix spelling of an option, remove a duplicate call and update docs
2019-06-25 14:40:05 +08:00
Thibault Duperron
e3fe12eacf Merge java8 doc for spring (#3122)
fix #3117
2019-06-21 22:13:19 +08:00
Slavek Kabrda
66bf0dce9e [Golang][client] Allow generating go client code as a submodule. (#3012) 2019-06-05 17:47:46 +08:00
Sai Giridhar P
dc3543981e feat(java-jersey2): Making response headers case-insensitive (#3072)
* feat(java-jersey2): Making headers case-insensitive

* feat(java-jersey2): Updating documentation
2019-06-04 22:03:01 +08:00
William Cheng
c6207c0a49
Mark nodejs-server as deprecated (#3083)
* mark nodejs-server as deprecated

* update opeanpi3 script

* add new file
2019-06-04 21:38:28 +08:00
Sai Giridhar P
6b7c5edbce feat(java-okhttpgson): Making API response headers case insensitive (#3029)
* feat(java-okhttpgson): Making API response headers case insensitive

* feat(java-okhttpgson): Adding documentation

* feat(java-okhttpgson): Removing tabs

* feat(java-okhttpgson): Removing tabs
2019-06-03 15:40:22 +08:00
sylvainmoindron
7916f2f880 [kotlin-spring] add reactive behavior via Kotlin coroutines (#2934)
* kotlin spring : add reactivity via kotlin's coroutines

* add kotlin spring boot reactive samples

* bug : fix spring version and import for coroutines

* remove exception handler for reactive (webflux doesn't support it)

* add spring milestone repository to maven pom

* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter

* fix baseType for ArraySchema

* regenerate samples

* updating documentation
2019-06-02 15:50:45 -04:00
Sai Giridhar P
40ec016c87 [csharp] Make API response headers dictionary case insensitive (#2998)
* fix(response-headers): Making response headers case insensitive

* fix(response-headers): Making response headers case insensitive

* feat(csharp): Headers case insensitive

* feat(csharp): Making API response's headers case-insensitive

* feat(csharp): Indentation fix

* feat(csharp): Indentation fix

* feat(csharp): Adding generator's documentation
2019-05-29 19:39:54 +08:00
Gualtieri Mario
50878fbc2e [TS][Inverisify] Adding support for RxJS 6 (#2793)
* Add support to http patch method

* Add support to rxjs6

* Align sample

* Add sample for openapi3

* Change usage of single quote to use only double ones

* Fix wrong changes of typescript-angular package.json template

* Add `map` keyword inside reservedWords

* Add typescript-inversify inside README


Add typescript-inversify inside README

* fix merge issue, update petstore

* update doc
2019-05-27 23:33:07 +08:00
Vincent Devos
6a1f33d2f8 adjust template folder to lang option (#2959)
* adjust template folder to lang option : scala-finch, java-msf4j, java-undertow, php-ze-ph

* Changing file permissions

* move ze-ph and finch resources folder
2019-05-22 20:55:05 +09:00
Vincent Devos
6bffe4dbc7 [Groovy] improve code parsing body/form params (#2879)
* [Groovy] improve code parsing body/form params

* remove leading space

* remove leading space
2019-05-20 11:20:48 +08:00
Vincent Devos
f550553e3f [Typescript] gets package npm version from API specification (#2920)
* [TypeScript] gets package npm version from API specification

* forgot flowtyped
2019-05-17 13:55:24 +08:00
Vincent Devos
ef26ce68d4 [Kotlin] client improvement / remove WildCards in client/server (#2862) 2019-05-11 11:42:11 +08:00
Vincent Devos
98afbe062b [GROOVY] update client generator to a stable version (#2847)
* [GROOVY] update client generator to a stable version

* fix tab

* fix remove using invokerPackage

* fix test
2019-05-11 11:10:25 +08:00
Vincent Devos
70108b753e [JAVA] fix artifactVersion is not taken from specification (#2798)
* [JAVA] fix artifactVersion is not taken from specification when not provided by generator option

* update jaxrs-spec samples

* update docs generator jaxrs
2019-05-09 15:19:52 +08:00
fj-roman
7eb2be9c99 [Kotlin] add apiSuffix configuration (#2690)
* add apiSuffix configuration

* Add default value for Api suffix

* remove overriding method toApiName

* refactor the global option apiSuffix to kotlin specific feature

* add missing Option for apiSuffix

* extend readme.md for apiSuffix configuration

* update doc

* add testcase
2019-05-07 21:37:32 +08:00
Vincent Devos
a4f2e15bb7 [TypescriptAngular] gets package npm version from API specification (#2810) 2019-05-07 18:50:36 +08:00
Vincent Devos
97e4270c0b [Java] improve docs with adding default value for additional properties (#2770)
* [Java] improve docs with adding default value for additional properties

* remove using File.separator for sourceFolder/projectTestFolder path

* Improve artifactId and artifactVersion description

* update doc java pkmst and sample
2019-05-06 22:31:12 +08:00
William Cheng
909d454f9d
[F#] minor improvements (#2825)
* Add template owner of F#

Add template owner of F#

* rename fsharp-giraffe-server

* add nmfisher to tech committee

* update windows batch file

* update doc
2019-05-06 22:11:50 +08:00
Jim Schubert
6e1c8976fc
[feat] Intro GeneratorMetadata (stability index) (#2816)
* [feat] Intro GeneratorMetadata (stability index)

GeneratorMetadata offers an immutable object created via Builder pattern
which allows generators to explicitly define their stability (stable,
beta, experimental, deprecated) as well as a message to be shown during
generation.

This is a step toward:

* Fleshing out the "Core" artifact (#845)
* Providing a place to encapsulate feature-oriented metadata (#840)
* Providing a means to communicate end of life scheduling (#116)

This new structure, specifically the Stability property, allows us to
offer future enhancements such as allowing users to filter down to only
"Stable" generators via CLI, and eventually any compat table (see #503).

* Mark deprecated generators as deprecated in-code

* Re-export docs/generators.md
2019-05-05 16:54:22 -04:00
William Cheng
e8a83dfe1f
Add beta server stub generator for F#/Giraffe (#2802)
* Beta server stub generator for F#/Giraffe (#2705)

* first commit for F#/Giraffe

use CLI generator

work on handlers

add binding to url params

add parameter declaration to handler & fix array types

order models by dependency and add tests

add oauth handlers

add service generation

add service implementation

return json for map types and add all return types to service implementation

pare down record types for readability

move implementations to impl folder

fix additional handler invocation

remove logging

remove open api type provider package reference

add sane defaults for OAuth

add readme and reorganize files for easier ignore

fix oauth checks and move login to default template

typedef operation body params as model

add API test templates

fix test templates

set project & other folders when packageName is set

add ignore to test pipes

add ignore for oauth to hide compile warnings

escape model types for generic dictionaries

remove Boolean object from primitives

fix handler and param templates for multiple path params

remove "Model" from model module names and fix import mapping for dictionary

add package name to model imports

change model templates to use imports

move login to CustomHandlers

raise exception where oauth not properly configured

allow webhost configuration from CustomHandlers

remove explicit support for nullable types and render option in template instead

move Cookie options to CustomHandlers

add header params

integrate api key provider

add nullable to datetime types

fix test generation and pretty up model folder

add context path to handler test template

dont copy spec file

remove superseded copyright notices

remove superseded copyright notices

* remove carriage return in fsharp template

* remove superseded sample output directory

* fix bash build script

* update generated sample

* update documentation

* add new file

* fix compile issues
2019-05-06 01:30:51 +08:00
Jim Schubert
a02cb19d31 [docs] Document new templating engine, adding ability to reference templates by file to comlete the example (#2773) 2019-05-05 18:03:28 +08:00
Jim Schubert
a2fb88c1c1
[all] Adds strict spec option (#2783)
* [all] Adds strict spec option

Introduces an option to allow user customization of strict specification
behaviors. For instance, OpenAPI 3.x requires a path object name to be
prefixed with '/' so we append any missing '/', but this may not be
desirable to some users or generators. In this commit, this fix specifically is
the only modification affected.

* Clarify strict-spec docs, add option to README.md

* Update CLI options in docs/usage.md
2019-05-03 10:57:47 -04:00
Vincent Devos
bd0d6af968 [TypeScript-axios] fix using withSeparateModelsAndApi and withoutPrefixEnums with additional-properties option (#2719) 2019-05-03 11:40:20 +08:00
William Cheng
05053f5b8a [ASP.NET Core] minor format fix, better null check (#2778)
* aspnet core format fix, better null check

* minor wording change

* update doc
2019-05-01 16:55:14 -04:00
Jim Schubert
5ea4391af5 [cli][gradle] Adds package name as a global option (#2557)
* [cli] Support packageName as global option

CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.

This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.

* [gradle] Add packagName as global option

This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
2019-05-01 00:46:48 +08:00
William Cheng
d3f418166b
mark java jersey1 client as deprecated (#2767) 2019-04-30 19:14:52 +08:00
William Cheng
ff556609c7
Remove setting generateAliasAsModel in rust server generator (#2714)
* remove setting generateAliasAsModel in rust server

* update rust server samples

* update doc
2019-04-23 03:03:15 +08:00
William Cheng
fab980cf79 update samples 2019-04-22 13:57:59 +08:00
Sebastien Arod
8344102341 Improve CONTRIBUTING.md (#2699)
* Improve CONTRIBUTING.md

Indicate that bin/openapi3 scripts should be executed too.

Try to clarify how to run tests:
* use in sample a client for which tests exist
* explain where to run the command and how to find the artifactId

* Update contributing.md by running copy-to-website
2019-04-22 11:53:56 +08:00
Amit Joshi
1e4f4ab9f2 [aspnetcore] Support async tasks and some code cleanups (#2629)
* Add first cutasync support and small cleanups

* Add apiPackage, modePacke to use for namespaces, for library don't generate wwwroot and dont make model class partial and default to no swashbuckle,  , workarodun empty string cliOption

* Update docs

* Don't add async for library

* Fix generated program for async and task

* Default models names space should be <package>.Models

* Remove commented out code

* Remove unnecessary code, fix a comparison and add an else fo an if statment.

* Update docs
2019-04-20 00:32:04 +08:00
Vincent Devos
c941b87067 [ONLINE] Minor links fix (#2644)
- usage : fix link to generator-specified parameters
- usage : fix next page link not found
2019-04-11 23:29:18 +08:00
kacbuk001
07ebccd455 Clean up the license field in various templates to ensure it's unlicense by default. (#2627) 2019-04-09 10:38:06 +08:00
Victor Orlovsky
b444456ec8 [Java][Rest-assured] Update dependencies for rest-assured client (#2599)
* Update dependencies for rest-assured client

* Return okio_version in build.gradle.mustache
2019-04-06 00:26:11 +08:00
HichemChiouchiou
1436ee1da6 correction of alias to generate php-symfony (#2547)
* [BUG][php-symfony] Fix alias generation

* fix

* add bundle alias option and alias logic when it is not defined

* run bin/utils/ensure-up-to-date to update php-symfony.md
2019-04-05 22:51:31 +08:00
Deniz
d9ae80f76f [typescript-axios] removing namespaces from enums (#2502)
* remove namespaces in typescript-axios

* clean-up

* update samples

* update tests

* add with-npm-version-and-separate-models-and-api to all.bat

* update with-npm-version-and-separate-models-and-api samples

* update typescript-axios docs
2019-04-05 07:18:47 +08:00
Vincent Devos
117efe83c0 [Doc] Better highlight of generators docs page with generators specific parameters (#2592)
* [Doc] Better highlight of generators docs page with generators specific parameters

* [Doc] Better highlight of generators docs page with generators specific parameters
2019-04-05 06:38:33 +08:00
Gursahib Singh Sahni
77f878042d [DOC] Elaborate usage of implicitHeader option (#2598)
* [DOC] Elaborate usage of implicitHeader option

* Improvising implicitHeaders documentation

* Pushing uncommitted changes. Period char was missed
2019-04-05 06:21:10 +08:00
Jim Schubert
128da8e84b
[aspnetcore] Feature/cleanup (contributor rebase) (#2506)
* Add optValue to CliOption
* Fix compilation with ASP.Net Core 2.1
* Add ASP.Net core 2.2
* Use CliOption for classModifier, operationModifier, buildTarget, add ASP.Net core 2.2
* Make abstract method look cleaner
* Update docs
* Regenerate sample
2019-04-01 21:07:35 -04:00
William Cheng
b55cdfbe53 remove emitDefaultValue option (#2559) 2019-04-01 08:41:27 -04:00
Tanguy Invernizzi
0bc06f8d4d Fixed typo in migration-from-swagger-codegen.md (#2548) 2019-03-29 23:35:05 +08:00
Jérémie Bresson
09ba78b26a Update swagger-parser to '2.0.11-OpenAPITools.org-1' (#2262)
* Update swagger-parser to '2.0.10-SNAPSHOT'

* Add a TODO

* Update input spec

* Update input spec again

* Update samples

* Set version to 2.0.10-OpenAPITools.org-1

* Ensure up-to-date

* Update to 2.0.11-OpenAPITools.org-1

* Run bin/utils/export_docs_generators.sh

* update dart-jaguar doc
2019-03-29 17:53:54 +08:00
William Cheng
0f99cd0d37 update dart jaguar doc 2019-03-27 16:32:35 +08:00
Jaumard
41b5d0e8fc [Dart][Jaguar] and proto serialization support (#1793)
* add proto format support for jaguar generator

* Add openApiType to CodegenProperties
Finish proto generation
2019-03-27 09:48:09 +08:00
William Cheng
09d27e82e7
Minor enhancements to Scala Play server generator (#2512)
* minor enhancements to openapi-generator

* update doc

* remove oudated doc
2019-03-27 09:47:47 +08:00
William Cheng
5a6f4cb4a9
Update Java Vertx client dependency (#2507)
* update java vertx client dep

* update java client description

* update sample
2019-03-26 18:52:34 +08:00
dragosnutu
9e391efd1d [#2442] - implement yamlsample config help output; (#2443) 2019-03-26 15:22:59 +08:00
Jochen Scheib
c918d7ad64 go-server: Support additional properties as command line arguments (#1555)
* Support additionalPorperties as command line arguments

* Move Readme into main dir

* Update Mustache

* Update sample

* Test coverage

* Move cli options

* Revert options

* Remove tabs

* openapi 3 examples

* Update readme

* serverPort to int

* Move package version cli option to AbstractGoCodegen

* Update samples

* Tab to spaces

* Update docs and sample with xml

* Manual update doc

* Another doc try

* Regenerate go-gin-server doc
2019-03-25 21:19:06 +08:00
dragosnutu
1f45ea7d1a [#2425] - implemented yaml parsing for config file. (#2434) 2019-03-18 21:49:45 +08:00
William Cheng
d18bf044e8
[Java][C#][JS] remove localVariablePrefix (#2423)
* remove localVariablePrefix from template

* remove local variable prefix option from java gen

* remove local var from c#, js

* update doc
2019-03-18 10:46:33 +08:00
William Cheng
94466d54b3 Remove global options from PHP generators (#2403)
* remove global options from php generators

* update doc
2019-03-17 09:57:45 +09:00
Jon Schoning
c9737cf97d
[haskell-http-client] add cli option customTestInstanceModule (#2406)
setting `customTestInstanceModule` will import typeclasses from the
specified module into tests/Instances.hs, to provide typeclass
instances for types not known by the generator

this property set using `--additional-properties`

example:
```
--additional-properties=customTestInstanceModule=CustomInstances
```
2019-03-15 07:34:46 -05:00
William Cheng
d2ce584a3a
Rename generator: csharp-refactor => csharp-netcore (#2348)
* renmae csharp-refactor to csharp-netcore

* update appveyor config

* update config

* update doc
2019-03-12 09:04:25 +08:00
William Cheng
b128d14707
[scala-httpclient] mark the generator as deprecated (#2357)
* deprecate scala-httpclient

* update doc
2019-03-11 22:45:16 +08:00
Jim Schubert
f39e200e5d C# refactor improvements: .NET Standard and .NET Core (#2187)
* [csharp-refactor] limit available target framework

This removes .NET 3.x, .NET 4.0, UWP, and the "5.0" option (which
referred to PCL 5.0). This gives us a smaller footprint for maintenance,
and doesn't necessarily block consumers from creating custom templates
to support those target frameworks. A workaround for users wanting these
options is to build against openapi-generator 3.3.4.

This moves logic for applying additional properties to strategies per
target framework, as a means to reduce maintenance overhead at the cost
of maybe a little redundancy between strategies.

* [csharp-refactor] Fixing .netstandard support

* [csharp-refactor] Fixing netcoreapp2.0 support

* [csharp-refactor] Regenerate samples

* Fix toLowerCase missing Local.ROOT

* [csharp-refactor] Remove unnecessary bash/batch scripts, update appveyor.

* Update appveyor.yml to test for dotnet/xunit

* Update appveyor.yml

Wrap xunit console environment variables in quotes, to prevent yaml syntax error.

* Update appveyor.yml

Try to use dos-style switches, attempting to remove yaml parse error in appveyor. Previous command matched appveyor docs, but resulted in the parser error.

* Update appveyor.yml

Wrap full commands for netstandard tests in quotes

* Fix linux style slashes in dotnet build, use dotnet test over appveyor xunit

* [csharp-refactor] Update generator docs
2019-03-10 12:33:49 +08:00
ota42y
e810848a03 fix test script path in CONTRIBUTING.md (#2290)
* fix test script path in CONTRIBUTING.md

`./bin/ruby-petstore.sh` renamed by #534 so we should fix CONTRIBUTING.md

* fix website
2019-03-07 15:55:20 +08:00
Jeff Groom
9236e50098 add Blueplanet language (#2184)
Add python-blueplanet server generator
2019-03-07 15:48:57 +08:00
Adrian Price
2985c0f0b8 JAX-RS/CXF 1158 Options to generate fully functional method bodies passing fully populated test data (#1879)
* add option to generate alias as model

* [JAXRS/CXF] Emit method bodies, test data (#1158)

New jaxrs-cxf-extended generator with options:
 - supportMultipleSpringServices Support generation of Spring services
   from multiple specifications
 - generateOperationBody (boolean) Enables generation of fully
   functional test/service method bodies that pass/return random
   but valid values & models.
 - loadTestDataFromFile (boolean) When true, generated method bodies
   load test data from a generated JSON file. When false, generated
   method bodies contain inline code to construct the test data.
 - testDataFile (string) The path of a JSON file to contain generated
   test data. The file is initially generated but editable; edits are
   preserved by subsequent generations.
 - testDataControlFile (string) The path of a JSON file to control test
   data generation - specifically, to control the number of items
   required in array properties, structured by API class
   / operation name / parameter name. The file is initially generated
   but editable; edits are preserved by subsequent generations.
 - tests for the jaxrs-cxf-extended generator, including the new options
Bug fixes:
 - fix bug (DefaultGenerator): handle absolute paths in supporting file
   spec
 - fix bug (DefaultCodegen): process enums in allVars
 - fix bug (AbstractJavaCodegen): support multiple inheritance via
   allOf (inheritance code deleted, as a subsequent pull broke it)
 - fix bug (JavaCXFServerCodegen): use operationId instead of nickname
(gets out of step with duplicate operationIds)
 - fix bug (JavaCXFServerCodegen): set appropriate default
consumes/produces for operations with body parameters or non-void
returns (CXF providers don't handle */*)
 - fix indentation (DefaultCodegen)
 - add support for a system property openapitools.implementation.version
to specify the package implementation version when running non-JAR'd
classes in an IDE (otherwise {{{generatorVersion}}} evaluates to
'unset'.

* reformat code

* make sh executable

* fix template folder

* fix template folder, update samples

* run test data manually to avoid ci failure
2019-03-06 08:58:11 +08:00
Michael van Niekerk
caf404d857 Typescript+Axios: Separate model and api classfiles and package (#2005)
* Typescript 3.2

* Typescript spread operator

* Add vendor extension to the operation

* Remove url.URLSearchParams

* Generate form data in API

* Make axios scripts executable

* Reran generator

* Generate sample code

* Codegen having the model and api extra flag

* Revert to 2.4 Typescript

* COLLECTION_FORMAT.{{collectionFormat}} everywhere for consistency

* Consistency on the CollectionFormats, comment on the vendor extension

* Throw exception if api and model packages are not given

* Templates splitting api and models

* Post process the operations in the the process

* Beginning to get the axios tests up

* Ensure-up-to-date doesnt include TS/Axios tests

* Docs update for Typescript/Axios

* Merge master

* Api tests re-run

* Add windows bat file
2019-03-05 16:44:33 +08:00
William Cheng
8843df65a4
[aspnetcore] - make more configurable and generate abstract class library #2181 (#2282)
* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Match with genrators - no changes from new code

* Fix inadvertent changes

* No idea why the names of params have changed pet to body for instance

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes
2019-03-03 23:23:17 +08:00
Jon Schoning
c30a21ac3c
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
2019-02-28 13:04:50 -06:00
Pablo Lázaro
ad8aa7dc0e [Java] adds snapshotVersion CLI option and uses API version as artifactVersion by default (#2033)
* [Java]: adds snapshotVersion CLI option and uses API version as artifactVersion by default

* fix some typos

* fix naming diff between branches

* ensure-up-to-date

* update samples
2019-02-18 17:54:27 +08:00
Vincent Devos
8d5b600277 [typescript-angular] Update default Angular version from 4.3 to 7.0 (#2117)
* [typescript-angular] Update default Angular version from 4.3 to 6.0 (NPM Client)

* [typescript-angular] Update default Angular version from 4.3 to 7.0 (NPM Client)
2019-02-18 17:49:42 +08:00
William Cheng
20d5adcdd5 [PHP] remove deprecated options (#2083)
* php remove deprecated options

* update php doc

* clean up composerVendorName in code, templates

* update samples
2019-02-10 09:25:20 +09:00
William Cheng
0a2fb8db8f
Remove localVarPrefix from Java client (#2045)
* remove localVarPrefix from java client

* rename local varaible

* update samples
2019-02-08 11:51:26 +08:00
Jérémie Bresson
02a8dad77c
Document 'x-enum-descriptions' and 'x-enum-varnames' (#2010) 2019-01-29 13:56:37 +01:00
Jérémie Bresson
046db19a85 [core] cleanup: remove OpenAPI parameter from CodegenConfig methods (#1953)
* Add OpenAPI parameter to DefaultCodegen#toDefaultValue(..)

* Remove CodegenConfig#fromOperation()

* Remove allDefinitions parameter from fromModel(..)

* Remove definitions parameter from CodegenConfig#fromOperation(..)

* remove schemas parameter from DefaultCodegen#fromRequestBody(..)

* remove schemas parameter from DefaultCodegen#fromCallback(..)

* Remove openAPI parameter from CodegenConfig#fromModel(..)

* Remove openAPI parameter from CodegenConfig#fromOperation(..)

* Remove openAPI parameter from DefaultCodegen#fromProperty(..)

* Remove openAPI parameter from DefaultCodegen#fromParameter(..)

* Remove OpenAPI parameter from several methods

* Use ModelUtils.getReferencedParameter(..)

* Remove unused variable

* Remove openAPI parameter from DefaultCodegen#fromResponse(..)

* Remove openAPI parameter from DefaultCodegen#addHeaders(..)

* Remove from addConsumesInfo(..)/addProducesInfo(..)

* Improve test: add property to prevent Pet from being a free-form object

* remove globalSchemas Map<String, Schema>

* remove deprecated method: postProcessOperations()

* Remove 'Map<String, Schema> allSchemas' from addProperties(..)

* Remove 'Map<String, Schema> allDefinitions' from createDiscriminator(..)

* Remove 'Map<String, Schema> allSchemas' from unaliasPropertySchema(..)

* Rename globalOpenAPI to openAPI

* Update documentation

* Run “Optimize import” in IntelliJ IDEA
2019-01-28 16:19:36 +08:00
William Cheng
47e262fbb1
Add migration note about change in basePath (#1957)
* Add migration note about change in basePath

* update body parameter note
2019-01-22 16:56:27 +08:00
William Cheng
2fa0e810bf update samples and docs 2019-01-22 16:23:16 +08:00
Bernd
d33c4bb4a3 add new generator: typescript-rxjs (#1884)
* Merged in feature/rxjs (pull request #2)

Feature/rxjs

* feat: duplicate typescript-fetch, add docs

* duplicate fetch codegen to use for rxjs

* remove mapping helpers from modesl

* introduce rxjs, adjust apis

* make middlewares work

* fix namespace issue with babel

* fix enum generation

* fix formatting of enum

* remove other readme

* feat: duplicate typescript-fetch, add docs

* duplicate fetch codegen to use for rxjs

* remove mapping helpers from modesl

* introduce rxjs, adjust apis

* make middlewares work

* fix namespace issue with babel

* fix enum generation

* fix formatting of enum

* remove other readme

* add bash scripts to generate samples

* remove environment import

* add rxjs dependency to package.mustache

* add genereated samples

* add docs

* add windows scripts

* adjust license info

* update "ensure-up-to-date" by typescript-rxjs

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* Update modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache

Co-Authored-By: denyo <hacker.bernd@gmail.com>

* fix missing return for Observable<void>

* use shorthand syntax

* improve linting

* improve linting

* revert previous changes

* Revert "Update modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache"

This reverts commit 26f65ca4ce29ab9ab4602e7cb0367895e93ddf4e.

* recreate typescript-rxjs samples
2019-01-21 23:26:18 +08:00
William Cheng
f415332406
update java default value (#1949) 2019-01-21 01:47:49 +08:00
William Cheng
c51f333f6c update docs 2019-01-18 18:35:30 +08: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
Wouter
22ce88eb26 Fixed a small type (#1921)
This is a very little nitpick, but I hope it is useful anyway.
2019-01-16 10:21:23 +08:00
Akihito Nakano
6e4556772c Delete langs command (#1836)
* Delete langs command

* Delete "langs" from docker entrypoint script

* langs -> list

* langs -> list
2019-01-07 08:57:05 -05:00
William Cheng
f0f214743e
Use JS ES6 as the default (#1825)
* set JS ES6 as the default

* update doc
2019-01-07 11:43:11 +08:00
Tomer Cohen
59db7cc568 remove unnecessary words from migration-from-swagger-codegen.md (#1791)
Removed 'an existing '.
2019-01-03 18:53:58 +08:00
William Cheng
2c051f265c
Add an option to use reflection in equals, hashCode (Java client) (#1767)
* add option to use reflection in equals, hashcode (java)

* add model test template to java client only

* update pestore samples

* update java samples

* update doc

* update usage, remove unused file
2018-12-31 10:03:05 +08:00
Yuriy Belenko
5400a7e445 [Slim] Add PHP CodeSniffer config template (#1764)
* [Slim] Add PHP_CodeSniffer config template

* [Slim] Update doc

* [Slim] Add local configs to gitignore

PHPUnit and PHP_CodeSniffer provides the same developing pattern when
user overrides global config with local one. In local config he can
set environment variables. Official doc recommends to not commit local
config files.

* [Slim] Remove phpcsStandard CLI option

Now user have full freedom to override config file. This option is not
used and not necessary anymore.

* [Slim] Refresh samples
2018-12-29 15:58:15 +09:00
William Cheng
1db105b6f9
Use CompareNetObject for object comparison in C# client (refactor) (#1765)
* add pet, array of array test, use CompareNetObject for comparision

* add an option, should trigger ci failure

* update doc

* use useCompareNetObjects in csharp-refactor petstore

* fix project template
2018-12-29 14:45:49 +08:00
Akihito Nakano
f19794464b
Delete --lang option (#1592)
* Delete --lang option

* Fix -l

* Fix -l flag (windows)

* Add migration guide

* Change to -g

* Remove lang option

* Change to -g
2018-12-09 19:26:51 +09:00
Erik Timmers
c0634ac213 [elm] Enable setting Http request trackers (#1609) 2018-12-06 23:41:44 +08:00
William Cheng
92d60b684a update samples 2018-12-06 18:58:21 +08:00
Erik Timmers
d75392e056 [elm] Enable setting base path for each request (#1538) 2018-12-04 18:36:55 +08:00
William Cheng
b226f52d13 Merge remote-tracking branch 'origin' into 4.0.x 2018-11-30 10:16:16 +08:00
Akihito Nakano
f7c857cc39
[Spring] Add an option to return success code (#1197)
* Returns status code which defined at Response Object

* Tweak indent

Remove the spacer "{{#async}} ... {{/async}}" "{{^async}} ... {{/async}}"

* Update samples^

* Fix broken indentation

* Update samples

* Revert methodBody.mustache

* Revert "Fix broken indentation"
  * This reverts commit 95b6a00f8b1d92a65e0d4467b5c4f034a9579e43.
* Revert "Tweak indent"
  * This reverts commit ba2cedc89723ed480e8282c0a4e07ab2d3670262.
* Revert "Returns status code which defined at Response Object"
  * This reverts commit f676a89e230dde6741aa96d7b2e27e04b35dbf5a.

* Example contains status code

* Update samples

./bin/spring-all-pestore.sh

* Fix syntax error

* Update samples

* Run bin/utils/ensure-up-to-date

* Make the changes an option `returnSuccessCode`

* Run bin/spring-all-pestore.sh to update samples

* Run ./bin/utils/export_docs_generators.sh
2018-11-29 11:51:25 +09:00
Simas Abramovas
777bf1f3aa Kotlin collection type (#1564)
* Allow specifying type

* Add test

* Update docs

* Don't modify types if the default option is chosen
2018-11-29 10:33:55 +08:00
William Cheng
51a3a22928
Add online services to the documentation (#1550)
* update online service

* update readme with online services

* minor wording change

* revise wordings

* add links to linode logo
2018-11-27 15:51:23 +08:00
William Cheng
736e8348b6 update documentation for a generator 2018-11-15 18:32:12 +08:00
William Cheng
2bcf5b2263 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-11-15 17:49:44 +08:00
William Cheng
69a766882d
Add tip about running online openapi-generator via Docker (#1415)
Add tip about running online openapi-generator via Docker
2018-11-12 11:37:30 +08:00
William Cheng
7c6beb9692 update generator doc 2018-11-10 00:28:08 +08:00
Simas Abramovas
f802e63f9f Add parcelizeModels cli option (#1289)
* Add parcelizeModels cli option

* Add info log to clarify the parcelization requirements.

* Update docs
2018-11-09 23:51:27 +08:00
William Cheng
e6c97a1bc1 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-11-08 18:18:12 +08:00
William Cheng
4245cf42dd update generator doc 2018-11-07 01:02:44 +08:00
William Cheng
71ecee02e9 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-10-26 23:13:28 +08:00
William Cheng
6b41260755 update documentation 2018-10-26 21:03:17 +08:00
William Cheng
4a47acce19 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-10-26 18:41:58 +08:00
William Cheng
eb4dfe0fc1 update documentation 2018-10-25 12:29:54 +08:00
William Cheng
3d7a019524
update samples and reenable ensure-up-to-date (#1304) 2018-10-24 13:56:24 +08:00
mwoodland
258de8909d Add support for using Spring HATEOAS to add links in the spring gener… (#1130)
* Add support for using Spring HATEOAS to add links in the spring generator.

* Ensure that Spring HATEOAS links appear last in the JSON serialisation of objects.

* A couple of changes following code review:
1. Make sure the @JsonPropertyOrder annotation is only used when the jackson library is being used since it's a part of the jackson library.
2. Make sure to include the Spring HATEOAS dependency in the pom file for the spring-cloud and spring-mvc generators when the hateoas option is enabled.

* Don't order the json properties since there's no requirement for the links to be last.

* Remove unnecessary import.
2018-10-23 22:56:03 +08:00
William Cheng
8507916d56
Update migrated generators in the migration guide (#1283) 2018-10-22 22:11:50 +08:00
William Cheng
147e193b31
minor doc revision (#1242) 2018-10-18 22:53:47 +08:00
William Cheng
83c55ec016 Merge remote-tracking branch 'origin/3.3.x' into 4.0.x 2018-10-16 23:42:29 +08:00
William Cheng
d8957af76b
Update generator option (#1236)
* update generator option

* update kotlin option usage

* update lua option

* update wording for lua option
2018-10-16 23:05:14 +08:00
William Cheng
9e3c7781bb Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-10-16 16:08:11 +08:00
Dec12 | Fujigon
fbd4411b22 fix export_generator shell script (#1223)
* fix export_generator shell script

* fix script with bash

* use bash instead of sh
2018-10-14 21:11:59 +08:00
mwoodland
8c0e130481 Allow specifying/overriding the parent in the pom file for Java and S… (#1132)
* Allow specifying/overriding the parent in the pom file for Java and Spring generators.

* Don't add extra whitespace to the pom file when the parent isn't overridden.

* Remove accidentally added white space.
2018-10-09 08:34:29 +08:00
William Cheng
4e8844273b
Prepare 3.3.1-SNAPSHOT (#1154)
* update version

* update petstore samples
2018-10-02 09:40:27 +08:00
William Cheng
2b87b309ad
Rename environment variable for Go to post-process file (#1091)
* renmae Go post process file env variable

* add back samples/client/petstore/c/libcurl.licence

* keep go samples up-to-date

* update go petstore samples

* update go samples without formatting
2018-10-01 21:24:32 +08:00
kemokemo
14de289fc1 [Go] Add a generator for the gin framework (#1048)
* copy from go-server and add go-gin-server generator

* change the templates for the gin

* fix warnings of the golint tool

* fix the path of script

* add samples

* delete unnecessary comments (#1048)

* make the help message more appropriate (#1048)

* fix the link address format (#1048)

* minor improvement
2018-09-22 00:45:32 +08:00
William Cheng
1b2f3fbfb6
Fix alias to map response (#1067)
* fix response reference to map

* update samples

* add null check for openapi
2018-09-20 19:29:33 +08:00
Ilya Hrankoŭski
aa29219f8c [Java][Feign] Add support for Feign 10 (#977) (#988) 2018-09-09 18:11:59 +08:00
Jérémie Bresson
31149a5a69
Publish documentation for the generators (#932) 2018-08-31 16:00:27 +02:00
Jérémie Bresson
b91c8e17a7 Improve documentation for usage of a generator in an other jar (#817) 2018-08-20 12:15:10 +08:00
William Cheng
0f30a052b2
Add an option to skip "form" model generation (#700)
* add option to generate all models

* update doc

* rename option to skipFormModel

* update petstore samples

* Update doc

* Update samples
2018-08-17 17:22:30 +08:00
William Cheng
c9085b4f2b
Update Q&A based on feedback from users (#695)
* update qna based on feedback from users

* Improvements

* minor fix to typo
2018-08-05 17:49:36 +08:00
Jérémie Bresson
1e95d36809
Add "Validate spec on generation by default" section (#683) 2018-07-30 17:53:26 +02:00
Jérémie Bresson
a8e8acead7
[java] add useNullForUnknownEnumValue option (#633) 2018-07-26 11:00:45 +02:00
Jeremie Bresson
45ed374b62 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-18 12:19:41 +02:00
Jérémie Bresson
baaa335664
Add documentation for CodegenDiscriminator (#587) 2018-07-18 09:07:35 +02:00
William Cheng
1d53ed5095
Mark rust-server as migrated (#584) 2018-07-18 01:44:16 +08:00
William Cheng
a18a50b7a4 Add an entry to clarify the Q&A page (#544) 2018-07-12 15:30:45 +02:00
Jérémie Bresson
7a7e221210
[Java] option for the prefix of boolean getters (#432)
* Add "booleanGetterPrefix" option
* Create `docs/migration-guide.adoc`
2018-07-03 17:00:15 +02:00
William Cheng
f4a534855c add an update to the Q&A (#371) 2018-06-21 10:16:12 -04:00
Jim Schubert
231202d0a3
Initial roadmap (#295)
* Initial roadmap
2018-06-20 00:29:17 -04:00
Ville Skyttä
798bf61fde Grammar and spelling fixes (#329) 2018-06-17 00:49:01 +08:00
Jim Schubert
55f9e31f81
Update template modification docs (#291)
Updates some confusing wording, specifies naming conventions, and links
to external `new.sh` for contributed templates (rather than modified
templates).
2018-06-12 21:35:09 -04:00
Phil Sturgeon
2ff81caef6 Expanding customization docs (#283)
* Expanding customization docs

As a new user I was very confused on how to either modify, override or create a new library. The existing docs were brief and had requirred knowledge that new users will not have,  and it took a lot of trial and error to make progress.

Also the wording seemed off. It kept talking about "client" when this project creates more than just clients, used "language" when some templates are not a language, and used library to mean a few seeminly different things. I've tried to consolidate the wording around "template" and "codegen".

The codegen is the Java code, and then you give it a "name" which is used for the template. That's the template folder it will live in, so it seems to work.

Feel free to use this as a base and edit it out, but this will all make a lot more sense to beginners. :)
2018-06-12 18:09:26 -04:00
Johannes Hoppe
f72059e7ac Updates small typo in qna.md (#262)
-was +were
2018-06-09 09:21:44 -04:00
Esteban Marin
d649c1311e Add syntax highlighting to migration guide (#237) 2018-06-06 11:38:07 +02: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
William Cheng
ad5d5f598e
Add TOC and a new section in the migration guide (#174) 2018-05-29 19:29:54 +08:00
William Cheng
917b6e0105
Add a section about body parameter name (#170) 2018-05-29 00:35:37 +08:00
William Cheng
9a2064cbf9
add 1-liner about customized templates, minor fix to dataType (#152) 2018-05-26 10:32:52 +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
a1ff502411
Rename datatype to dataType in CodegenProperty (#69) 2018-05-18 18:06:37 +02:00
Jérémie Bresson
8c541a247b Update Docker documentation (#97)
* Update migration-from-swagger-codegen.md

* Update README.md

Change order
2018-05-18 19:14:15 +08:00
Jérémie Bresson
e55ba567a9
Update integration.md
Fix url for "openapi-generator-maven-plugin"
2018-05-18 07:18:07 +02:00
William Cheng
7c5dfbfa01
Minor improvements to OpenAPI Generator Online (#54)
* add copyright note, dockerfile

* update online generator doc
2018-05-16 02:11:40 +08:00
William Cheng
b5942624d6
update documentation (#428) 2018-05-12 10:19:27 +08:00
William Cheng
5ae2d9b5f0
Add Question & Answer section (#413)
* add question and anaswer section

* add project URL to the license

* Use relative path for link between pages

* Reword some sentences, remove we/they style
2018-05-11 13:28:17 +08:00
Jérémie Bresson
dc4d6e499c Add Migration from swagger-codegen guide (#408)
* Add Migration guide

* Update migration-from-swagger-codegen.md
2018-05-10 13:51:19 +08:00
Jérémie Bresson
fbf2e135ef Docs: several small fixes (#399)
* Fixes for CONTRIBUTING.md

* Other docs fixes
2018-05-09 21:49:27 +08:00
Jeremie Bresson
3d7eaf96fc Move docs to a separate folder 2018-05-04 06:29:23 +02:00