Commit Graph

9575 Commits

Author SHA1 Message Date
wing328
cab4fc0fed add support for csharp net40 (#6792) 2017-10-27 22:47:02 +08:00
Christophe Bornet
fe2ed67f20 Remove Accept request header from api signature (#6704)
* Remove Accept request header from api signature

* Inject HttpServletRequest to get request header and clean templates

* Use constructor injection for HttpServletRequest

* Implement example in default controller responses
2017-10-27 22:45:30 +08:00
Giulio Pulina
f14e07280a Fix #6391. Avoid Retrofit crashing because of @Path params defined after @Query params (#6796) 2017-10-27 22:35:01 +08:00
Kenny Jones
28d14e34c4 [python-flask] Apply template tweaks to improve lint results (#6826)
The linting results for the generated samples are as follows
where the first number is the BEFORE and the second is AFTER.

flaskConnexion          1843 vs. 20
flaskConnexion-python2  1841 vs. 19

For the complete details please see the following gist.
https://gist.github.com/kenjones-cisco/edc9d71ef7fd2bf23714ecbb693d52b3
2017-10-27 22:18:14 +08:00
korkut89
f472b623f0 Fix RefProperty bug for flattening MapProperty's inner properties. (#6823) 2017-10-26 23:55:00 +08:00
Kenny Jones
54b670b7e0 [python-flask] Create main function and entrypoint (#6814)
Enable the creation of the entrypoint so that the server can be started
using a named command instead of needing to always use `python -m` to
run the server.
2017-10-26 20:38:30 +08:00
Stephan E
f78d958ec0 Fix ruby model generation with objects and additionalProperties (#6816)
* Fix model generation with objects and additionalProperties

* Generate Ruby Petstore

* Generate Ruby Security Petstore
2017-10-26 19:59:38 +08:00
Keni Steward
4f3c86aa14 Adding forRoot instead of forConfig and forcing only 1 instantiation of the ApiModule (#6775)
* Added forRoot and constructure duplicate check

* added imports

* updated providers display format

* updated examples

* Moved providers so users don't hav eto use forRoot if they don't want.

* Updated the readme
2017-10-26 17:57:30 +08:00
Jérémie Fraudeau
681b1c20ea [Scala][Finch] Fix interpretation of queryParams and headers (#6809)
* [Scala][Finch] Fix interpretation of queryParams and headers

* [Scala][Finch] Updates the sample for Finch generated server
2017-10-26 16:44:06 +08:00
wing328
6814530d69 fix enum in path parameter (spring) (#6810) 2017-10-25 22:30:36 +08:00
Asad Saeeduddin
49974c51bd Change return type from any -> Response (#6774)
* Leftover updates to sample file

* Change return type any -> Response

* Update samples
2017-10-25 12:34:37 +08:00
Halil İbrahim Şener
f42a4a51dd [javascript] Use babel-preset-env instead of es2015 and upgrade babel-cli and babel-core (#6799) 2017-10-25 11:12:41 +08:00
Brian Kim
044bfdac39 Fix #6166 by adding @Deprecated annotations in Java jersey2, okhttp-gson, resteasy libraries (#6801) 2017-10-25 11:10:03 +08:00
Dimitar Ivanov
ab338f8cb9 Erlang-server: fix dialyzer; fix min and max checks (#6752) 2017-10-25 10:57:53 +08:00
Esteban Marin
f4ac6feae2 Bugfix/6727 import http client module (#6757)
* [angular-typescript] imports HttpClientModule

HttpModule has no effect, since the new `HttpClient` is now used. fixes #6727

* #6727: import http client module or http module, depending on setting

* #6727: import http client module or http module, depending on setting

* #6727: generate samples
2017-10-25 10:53:20 +08:00
Keni Steward
98e5612c84 Update README.md (#6797)
Added FINRA as a company using swagger codegen opensource
2017-10-25 10:02:05 +08:00
Esteban Marin
66cbab1947 Bugfix/6649 angular http client empty body (#6754)
* fix empty body issue

* #6649: add line break

* #6649: improve indentation

* #6649: improve indentation

* #6649: generate code

* #6649: generate samples

* #6649: fix method docs
2017-10-24 22:51:58 +08:00
korkut89
1f9dc4dd2e Fix required bug (#6733)
flatten methods replaces original ObjectProperty objects with new
RefProperty objects which required variables are false as default.
Newly created objects' required variables are set as the original
property.
2017-10-24 11:34:24 +08:00
wing328
698149573d fix r body parameter null issue (#6786) 2017-10-24 10:45:25 +08:00
Keni Steward
f7471add70 Fixed spacing in model.mustache (#6788)
* Added v4/v4.3 to typescript-angular-petsotre-all and renamed from angular2 to angular

* refactored typescript-angular-petstore-all.sh

* changed profile id for typescript-angularjs to properly have angularjs instead of just angular.

* Spacing at end of model template

* Corrected backwards compatible enum typing
2017-10-24 10:42:03 +08:00
tgifford-webfirst
fe5c2e627b Allow using help command with run-in-docker.sh (#6706) 2017-10-23 23:35:11 +08:00
naelrashdeen
b034e4446a [PHP][Symfony] Enhancements (#6615)
* Removed commented code

* Input validation is now supported as strict JSON validation

* [PHP][Symfony] Improve the implementation
Closes #6614

* Generated code is tested to assure it compiles and updated README to dynamically load dependencies via composer

* Updated shell script because shippable tests were failing
2017-10-23 22:50:56 +08:00
Steve Harrigan
a63e3f14f5 [TypeScript-Angular] Path URI Encoding Update (#6769)
* Replaced the method for updating path to prep for URL encoding.
The new method will switch TypeScript-Angular variables from snake_case to camelCase in the URL generation.

Imported StringBuffer, Matcher, and Pattern, since the new solution needs them.
Some extra whitespace on blank lines was removed.

* Since these were not up to date with the current master, I ran them and am commiting them here.
This way, the changes are shown here instead of after future commits.

* Simplified the code for the path conversion A LOT.
New version is much simpler to follow, and very efficient - only one iteration through the length of the string.
Removed regex Matcher and Pattern classes, since they weren't needed anymore.
2017-10-23 21:40:50 +08:00
Edward Wells
c6b6249f1c Fixed Python client docstrings (#6780)
* Updated api_client and configuration docstrings

ApiClient: Removed host param, added configuration and cookie param

Configuration: Docstrings are only read from the @property decorated
function, not the setter, moved the more descriptive docstrings from the
setters to property functions

* Ran bin/python-petstore.sh
2017-10-23 18:44:37 +08:00
kinok
18b16c7fe6 Update README.md (#6783)
Add my company to `Companies/Projects using Swagger Codegen`
2017-10-23 17:46:12 +08:00
Benjamin Gill
c71aa9da49 Add Metaswitch to list of companies (#6773) 2017-10-23 00:39:33 +08:00
Gustavo Paz
7cbd36e75b [Java][JAXRS-CXF] Improve API documentation in the CXF Server stub and Client generation (#6708)
* Inclusion of API documentation in CXF Server stub generation

* Inclusion of API documentation in CXF client generation

* Update of the Petstore CXF server sample

* Update of the Petstore CXF client sample

* Update of the Petstore CXF server annotated base path sample

* Update of the Petstore CXF server non spring application sample

* Changed {{{appDescription}}} to {{appDescription}} to use the HTML-escaped value in handling special characters like <, > in the description following the correction made by @wing328

* Update of the Petstore CXF samples
2017-10-22 23:00:48 +08:00
wing328
d2eb7cb35b remove unused files from Ruby petstore client 2017-10-22 22:09:50 +08:00
Giulio Pulina
af2089777d Fixed link to open issues (correct label is 'help wanted') (#6779) 2017-10-21 23:57:43 +08:00
wing328
4d994a2045 update ruby petstore samples 2017-10-20 22:17:09 +08:00
wing328
36f14ab757 update JS petstore samples 2017-10-20 22:16:41 +08:00
kinok
649811d542 [JavaScript] Handle custom request.agent (#6737)
* Handle custom request.agent

* better semantic
2017-10-20 15:00:27 +08:00
Jon Schoning
d0ec683a86 revert changes to fakes yaml (#6758)
* revert changes to fakes yaml

the yaml currently includes invalid definitions that do not exist: ('#/definitions/xmlObject').
revert to known good yaml state.

* update template creators
2017-10-20 11:06:28 +08:00
Peter Grman
8a5c361c1a Bugfix/6750 name clash between npm request and parameter called request (#6753)
* rename request to $request

* update examples files

* rename $request to localVarRequest

* rename oder variables to localVar...
2017-10-20 11:04:16 +08:00
wing328
f0b7daeec6 [Rust] rename rust2 to rust-server (#6747)
* rename rust2 to rust-server

* update rust-server batch file to use petstore test spec
2017-10-19 20:17:08 +08:00
Ramkumar Chandrasekaran
3472c68e0b bug fixes (#6743) 2017-10-19 18:16:56 +08:00
Benjamin Gill
1d89ab6e08 [New Generator] Rust API client/server generator (#6613)
* Rust API client/server generator

* `Future::boxed()` has been deprecated - replace with `Box::new(...)`

* rebasing to rust

* MMMLS211 use empty vec over none

* MMMLS211 rebuild after merge from rust

* MMMLS211 YAML array examples not wrapped in Some()

* MMMLS211 Array parameters bad mustache fix

* MMMLS211 don't parse map containers

* MMMLS211 Tidy container types

* MMMLS-211 rebuild example

* MMMLS211 mvn rebuild

* Percent-decode parameters contained in the path

* Produce warnings when unknown fields are present

We still accept unknown fields and discard them. However, to improve
diagnosability, we now write a warning log and return a `Warning`
header.

Note that this is server-only

* Markup

* MMMLS211: Make optional arrays Options again

* 211 markups

* Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch

* Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped

* Fix rustfmt to the correct version

* Fix rustfmt to the correct version

* Add more response information to ApiError in client

* Re-add missing brace

* Code review markups

* Allow converting out of wrapper types

* Store arrays in new-types too

* Use a new hyper_client every request

* Add vec-like traits to array types

* Xml support - new branch

* Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted

* MMSUB-172 Don't set Content-Type when there's no body.

If we don't have a body we've serialized, then don't declare
any content type for the nonexistent body.

This is really important for 204 No Content responses, but it's
also morally important for all other non-bodied responses.

* MMSUB-172 Move to swagger 0.6.

* Manually implement debug for the client

* Allow `Context` to be bound to `Api`, and not passed on every function call

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option
2017-10-19 17:37:02 +08:00
Gustavo Paz
d37894199b [Java][JAX-RS-CXF] Add JsonProperty to POJO (#6710)
* Included Open Systems International in the list of companies using Swagger Codegen

* Force Jackson to use the real names of the properties of the Data type defined in the YAML

* Update of the Petstore CXF server sample

* Update of the Petstore CXF client sample

* Update of the Petstore CXF server annotated base path sample

* Update of the Petstore CXF server non spring application sample

* Changed {{name}} for {{baseName}} following the correction posted by @wing328

* Update of the Petstore CXF server sample
2017-10-19 16:58:16 +08:00
Will Neild
e4abddf253 Fix spring api operation annotation (#6700)
* * Fix apioperation annotation using generics in class reference for spring server generation

* * Regenerate classes for new spring template
2017-10-18 16:38:12 +08:00
Jon Schoning
5219035b3a [haskell-http-client] handle Alias models + refactoring. (#6712)
* handle Alias models with newtypes

* add inlineConsumesContentTypes cli option

* generate swagger.yaml instead of swagger.json

* check for/validate unhandled authMethods

* refactoring
2017-10-18 10:47:56 +08:00
wing328
1ac04ae13a new files genreated by security shell scripts 2017-10-18 10:46:01 +08:00
wing328
7f9ae63880 add resteasy-all shell script 2017-10-18 10:39:34 +08:00
wing328
c783ec1d41 update all petstore security samples 2017-10-18 10:10:44 +08:00
Asad Saeeduddin
c4d5ba1533 Prefix local vars to prevent conflict with params (#6717)
* Prefix local vars to prevent conflict with params

Fixes #6698

* Update test snapshots
2017-10-18 09:58:36 +08:00
alex-fisher
ff9c723208 ContentType selection fix for csharp. (#6633)
* ContentType selection fix for csharp.
Updated to reflect java implementation. Previously any request body of type string was having the content type overridden to 'application/json'.  This prevented custom json ContentTypes

* updated the petshop codegen for C#

* Fixed content type selection test for csharp

* Replaced tabs with 4 spaces

* Removed trailing space / string comparison
2017-10-17 23:37:22 +08:00
François Rosé
be3e33f472 [C++] Sanitize operation ids. (#6664)
* [C++] Sanitize operation ids.

* [C++] Handle reserved words in `toOperationId`.

* [C++] Re-order reserved words alphabetically.

* [C++] Add missing reserved words.
2017-10-17 23:14:34 +08:00
wing328
27850d9596 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-10-17 22:53:34 +08:00
wing328
d093a34499 add jaxrs-spec-interface to circle ci 2017-10-17 22:53:04 +08:00
Giacomo
abe1be1a14 JAXRS-SPEC: fix container return type (#6659)
* JAXRS-SPEC: fix container return type

* Run
./bin/jaxrs-spec-petstore-server.sh
./bin/jaxrs-spec-petstore-server-interface.sh
2017-10-17 22:51:37 +08:00
wing328
5143fb58a4 revise go header, minor formatting fix (#6695) 2017-10-17 22:31:06 +08:00