Commit Graph

9975 Commits

Author SHA1 Message Date
Euan Kemp
26a665c771 [Rust] Recommend style based on 'rustfmt' defaults (#7335)
Rustfmt is widely accepted in the rust community. The actual style it
enforces is not completely stable, but running a reasonably recent
rustfmt and reading the short rfc-based style guide seems better than
nothing by a long shot.
2018-01-08 10:56:01 +08:00
Mehdi Jouan
c7f12d6c2d [Spring][Java] fix support of long values for @Max and @Min annotations (#7227)
* add support of long values for @Max and @Min annotations

* run shell scripts for java and spring

* fix import issue after running shell script
2018-01-08 00:22:06 +08:00
William Cheng
f7779c545e
refactor abstract scala codegen (#7334) 2018-01-08 00:20:38 +08:00
wing328
a85162fe33 Merge branch '2.4.0' of https://github.com/swagger-api/swagger-codegen into 2.4.0 2018-01-08 00:15:26 +08:00
wing328
8348d535ab Merge branch 'ehyche-ehyche_update_reserved_words_swift4' into 2.4.0 2018-01-08 00:14:17 +08:00
wing328
99823c04b9 update Swift4ModelTest.java with _id 2018-01-08 00:13:49 +08:00
wing328
0a6826d284 Merge branch 'ehyche_update_reserved_words_swift4' of https://github.com/ehyche/swagger-codegen into ehyche-ehyche_update_reserved_words_swift4 2018-01-08 00:05:49 +08:00
Sunrin SHIMURA
f5adbec1ff [Rust-Server] Use string literal based mime initialization (#7212)
* Use string literal based mime initialization to avoid invalid token error

* canonicalize mimetypes before checking
2018-01-08 00:00:12 +08:00
wing328
e51223eef1 Revert "Replaced \t with spaces (#7265)"
This reverts commit 14a2c81adb.
2018-01-07 23:46:33 +08:00
ccozzolino
d9745962be [Java:vertx] Initialize router in init method and re-use router member to create S… (#7234)
* Initialize router in init method and re-use router member to create SwaggerRouter

* Added generated samples for 7320 fix

* Fixed alignment to 4 spaces for 7320 fix
2018-01-07 23:37:37 +08:00
Jean-François Côté
193432ef52 Added optional extra JQueryAjaxSettings at the class and function level (#7238) 2018-01-07 23:21:43 +08:00
wing328
007974e3de Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-07 23:13:24 +08:00
craffael
9a284776d8 [Java] Fix serialization of the discriminator field when using GSON (#7075)
* set discriminator on object construction...

* regenerate all java samples

* run bin/java-msf4j-petstore-server.sh

* remove extra newline
2018-01-07 23:10:32 +08:00
Greg Marzouka
14e7158164 [Scala] Fix missing json4s import (#7271)
* [Scala] Fix missing json4s import

Closes #7270

* Update petstore sample
2018-01-07 22:50:30 +08:00
westse
ea3d039717 [scala] make stripPackage name configurable via property (#7226)
* Make stripPackage name configurable via property
- Needed because some APIs (e.g. Kubernetes) include version information in packages. Stripping causes many generated API and model classes to be named the same, causing a last-one-wins situation which is unacceptable.

* Per PR review, ensure stripPackageName Boolean property and log warning
2018-01-07 21:47:25 +08:00
wing328
b7f4f3e058 Merge branch 'csharp-enum-cleanup' of https://github.com/jimschubert/swagger-codegen 2018-01-07 19:11:40 +08:00
wing328
f9105c8bdc deploy snapshot version 2.3.1 2018-01-07 18:47:24 +08:00
Stephane Carrez
362625bfa9 [Ada] Add Ada support for server code generator #6680 (#7256)
* Add Ada client petstore samples
- Add script to generate Ada client support with swagger-codegen
- Add files to build the Ada sample
- Add main program to use the generated client samples API
  and connect to the server to perform some operations

* Add some description for the samples

* Update the documentation to explain how to build, how to use the generated Ada client code

* Add server support for path parameters
- Update postProcessOperations to scan each path parameter and emit a x-path-index
  vendor attribute to tell the index of the path parameter

* Add and fix Ada server code package declaration
- fix declaration of operations
- generate a generic package that must be instantiated with the target server implementation
  and which provides the skeleton (deserialization and serialization of data)

* Implement the Ada server side operations
- extract body, query parameters, path parameters
- serialize the result
- register operations to the server according to the path/routes

* Update the code generation to generate server Ada implementation code

* Improvement of Ada server support: generate the swagger.json template file

* Define toModelName operation to the creation of a model identifier

* Add support for server permission generation
- collect the security scopes in postProcessAuthMethod() method and make sure
  these scopes have unique identifiers.  Some scopes correspond to URLs
  but others correspond to pseudo identifiers.

* Use the #lambdaAdaComment filter to indent correctly a multi-line description

* Fix model generation to support arrays

* Update the generated GNAT project file

* Refactoring and improvement of server code generation
- Change the server generated code to pass a Context_Type object
  to allow the server implementation to get/set headers in the request/response
  and control what is put in some responses
- Generate the security permissions based on the scopes that have been collected

* Server code generation improvement
- Fix generation of GNAT project
- Generate the intermediate Ada packages if necessary
- Generate the server main

* Ada server main template

* Ada server code improvement
- Add support to generate server permission verification
- Fix the GNAT project definition
- Templates for Ada intermediate packages

* Skeleton for the server side implementation

* Generate an empty Ada server implementation

* Templates for the Ada server implementation

* Add a README.md file and a GNAT config.gpr file

* New templates to document the generated Ada server

* Add server configuration file for the Ada server

* Fix the log message in the Ada server to report the correct URI to connect to

* Generate the Ada server configuration file

* Improvement of Ada code model to support nullable types

* Update the Ada server templates

* Refactor the Ada code generator
- separate the Ada client and Ada server code generators
- register the Ada server code generator under the name 'ada-server'
  keep 'ada' for the client Ada code generator
- moved the common Ada code operation supports to the AbstractAdaCodegen

* Improvement and cleanup of Ada client and server code
- new template for the client main program
- fix the GNAT project template for client or server programs
- remove unused options to better use the --model-package option

* Fix the GNAT project file name to use a lower case name
Fix the default GNAT config
Fix the headers of intermediate Ada package files

* Regenerate the model and client Ada files

* Update the Ada client sample to take into account the Nullable types

* Regenerate some files with Ada Swagger Codegen

* Ignore generation of petstore.gpr
2018-01-07 18:44:20 +08:00
William Cheng
743bc650ab add shijinkui to scala technical committee 2018-01-07 18:12:55 +08:00
etherealjoy
c7ff303779 [qt5cpp] Disable creation of empty json fields and handle prefix in model generation (#7206)
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none

* Updates after review
Also common http files are splitted
Update Petstore examples
2018-01-07 17:50:44 +08:00
wing328
0469975632 minor enhancement to scala gatling 2018-01-07 17:38:55 +08:00
ryandavis84
6d2d4298df Gatling generator2 issue #6927 (#6934)
* Initial commit, Generates everything necessary to run a performnace test against a swagger api.  Just have to fill out the CSV feeder files with your data.

* adding samples and gatling-petstore.sh file

* Extending the AbstractScalaCodeGen

* Checking in the CodegenConfig file as it is needed to generate

* removing escaped reserved words

* Changed model to be able to make all variables utilize an underscore while json fields are still just the variable name

* Changing underscore to var as interpolation can not start with a _ in scala

* Fixing path params

* allow you to pass in a system property to define which config to use as a workload profile, use rate and instance multipliers to scale up and down your test, added ramp down after the test is completed, added global assertions.

* Addressing PR feedback

* missed semi-colon

* Bringing everything up to date with the renames that were suggested
2018-01-07 17:18:36 +08:00
ehyche
97ad90578d Split up model template into partials (#7297) 2018-01-07 16:57:58 +08:00
Jon Schoning
bca2b9fb5b [haskell-http-client] handle */* mimetype correctly & split api modules & allowNonUniqueOperationIds (#7254)
* [haskell-http-client] handle */* mimetype correctly

* [haskell-http-client] generate separate api modules, for each child api

* [haskell-http-client] add cliOption "allowNonUniqueOperationIds"

When cli option "allowNonUniqueOperationIds" is true,
allows *different* API modules to contain the same operationId,
and then each API must be imported qualified.
2018-01-07 11:59:55 +08:00
Oleksandr Slynko
919f867eba [go] Fix go client formatting (#7283)
* Fix some go client formatting issues

* Fix go client go imports

* Run `goimports -w .` on examples directory

* Sort imports in api

* Add new line between each property

Before secret feature was used to add new line using two property
declaration in the same line. There should be no new line before
first property. The easiest way is to use `-first` special
property
https://github.com/samskivert/jmustache#-first-and--last

New line are required so `goimports` won't reformat  whitespaces between
property name and type.

* Change whitespaces to tabs

* Fix whitespaces in api_client

There is a new line between each service to prevent `goimports` from
adding whitespaces between types and names

* Fix more whitespaces

There was a need to set special delimeter for formatting in the commit.
Go slices use curly braces and `jmustache` got confused when found
triple curly braces.

* Fix whitespaces in configuration.mustache

* Fix whitespaces for api response

* Support for optional description

Do not add whitespace if description is missing

* Add new lines between enum values to prevent formatting

* Generate go code from current code

- imports are not sorted :(
- there are extra whitespaces for different languages. I don't know why

* Run generate for security tests
2018-01-07 11:53:55 +08:00
etherealjoy
6afc0e9344 Fix for #7198, use QJsonObject instead of QJsonArray for maps (#7204)
[C++][Qt5] use QJsonObject instead of QJsonArray for maps
2018-01-07 11:50:22 +08:00
Akihito Nakano
4e5ec4c71c [PHP] Cleanup StoreApiTest (#7248)
* Move test codes in "test" to "tests".

* Simplify class name specification

* Regenerate test/Api/StoreApiTest.php

testGetInventory already exists in tests/StoreApiTest.php
2018-01-07 11:46:31 +08:00
Dennis Kieselhorst
ee5709177a [Java] update CXF to latest release (3.2.1) (#7284)
* update CXF to latest release (3.2.1)

* update CXF to latest release (3.2.1) - samples update
2018-01-07 11:43:34 +08:00
Akihito Nakano
50d217894c [PHP] Cleanup EnumTest (#7282)
* Move test codes in "test" to "tests"

- EnumClassTest
- EnumTestTest

* Regenerate test/Model/Enum(Class|Test)Test.php
2018-01-07 11:42:44 +08:00
Bernat Ràfales
9b5bba0193 Correct minor typo in Ruby gemspec files (#7263)
[Ruby] Correct minor typo in Ruby gemspec files
2018-01-07 11:41:14 +08:00
marcindanek85
14a2c81adb Replaced \t with spaces (#7265)
* Added copying array type descriptors (isBoolean, isNumber, etc) to specify the type of items in array

* Replaced \t with spaces
2018-01-07 11:40:10 +08:00
Ben Wells
7479fc5361 Generate swagger yaml for go client (#7281) 2018-01-07 11:37:40 +08:00
Akihito Nakano
fa9fc4b45b Delete ApiClient (#7305) 2018-01-07 11:34:17 +08:00
Akihito Nakano
68a4552741 Tweak test doc comment (#7280) 2018-01-07 11:23:05 +08:00
Akihito Nakano
fa3e72e6e3 [PHP] Cleanup AnimalFarmTest (#7279)
* Move test codes in "test" to "tests"

* Regenerate test/Model/AnimalFarmTest.php
2018-01-07 11:21:53 +08:00
William Cheng
4bb6d8993c
fix removeOperationIdPrefix in additional properties (#7301) 2018-01-07 11:15:13 +08:00
William Cheng
a5009b592e
add shijinkui to scala technical committee 2018-01-07 11:05:58 +08:00
wing328
bedd4c880e use openjdk7 in travis to ensure it works with jdk7 2018-01-07 11:04:48 +08:00
wing328
7f0dca7ac2 update version to 2.4.0-SNAPSHOT 2018-01-07 11:04:05 +08:00
Jinkui Shi
30bd6f680d [akka-scala] License info add in template header #7321 (#7322)
* [akka-scala] License info add in template header #7321

* generate petstore by akka-scala teplate
2018-01-07 11:00:57 +08:00
Kevin Brey
3af51d1b36 docs(readme): update link to contributing guid (#7332) 2018-01-07 10:49:38 +08:00
Jean-François Côté
3465f2918e Fix a regression bug that was introduce in a recent commit. Removed the tabs that were causing error in Play Framework (#7241) 2018-01-07 10:48:49 +08:00
Jean-François Côté
0a9c6f56c8 Fix issue #7262 with the parameter name in the path. The problem was that camelCase naming was forced only in this part of the code when everywhere else it is configurable. (#7313) 2018-01-07 10:33:46 +08:00
Aaron McGinn
6c2a583bcd Java8 fix (#7260)
* [JavaPKMST-Server] Change Java 8 code to Java 7 to meet project specifications

* Revert "Update readme to Java 8"

This reverts commit 54ce4caafc.
2018-01-07 10:32:40 +08:00
wing328
9c68c00fa5 update to 2.3.1-SNAPSHOT 2018-01-07 09:53:01 +08:00
William Cheng
3c7505670b
fix typo, update 2017 to 2018 2018-01-04 21:56:20 +08:00
Jinkui Shi
8b9c8ad618 [Doc] add huawei cloud to companies list #7308 (#7309) 2018-01-04 18:10:01 +08:00
Louis
1b7f654f11 Adding Peatio opensource as reference project (#7267)
Peatio is an opensource project and all API client are generated using codegen.
2018-01-03 10:58:43 +08:00
joy8zhang
bf35e8bbf2 Update README.md (#7298)
Added Hootsuite under Companies/Projects using Swagger CodeGen
2018-01-03 10:38:33 +08:00
joy8zhang
07977462c8 Update README.md (#7299)
* Update README.md

Added new resource `http://code.hootsuite.com/using-protocol-buffer-to-generate-sdk-at-hoosuite/?lipi=urn%3Ali%3Apage%3Ad_flagship3_messaging%3By4ATz3SDRXyvXJJ14LQysQ%3D%3D` onto `Presentations/Videos/Tutorials/Books`

* Update README.md

Added extra space
2018-01-03 10:37:41 +08:00