Commit Graph

3323 Commits

Author SHA1 Message Date
jfiala
38c879683a [Jaxrs-cxf-cdi] Add beanvalidation annotations updated (#4615)
* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* re-generate samples after rebasing #4091

* fix handling of inner enum templates #4091

* fix InputStream/Multipart imports and fileInputStream variable #4091

* fix paramName for files #4091

* consolidate beanValidationParams #4091

* add paramNameDetail #4615

* fix indentation and regenerate samples #4615

* reset samples jaxrs-spec to master

* update generated samples

* adapt Min/Max/DecimalMin/DecimalMax handling for int/long/else

* add ModelApiResponse
2017-02-06 00:55:30 +08:00
Markus
a83f8d0449 [JAXRS-Spec|Resteasy|CXF] Issue 4315 - Fixed bug generating arrays of enums (#4582)
* jaxrs-cxf: Fixed returning of enum arrays generating non-compiling code

* jaxrs-spec/resteasy: Fixed returning of enum arrays generating non-compiling code

* jaxrs-cxf: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation

 * Fixed escape char issue in ApiOperation summary
 * Fixed code generation for non String-type enums
 * Fixed @PATCH annotation import

* jaxrs-spec: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation
2017-02-05 23:01:18 +08:00
Johannes Herrnegger
95a8192c25 [Typescript-Angular2] Fixes #4703 (#4704)
* fix issue #4703

* run petstore
2017-02-04 13:00:26 +08:00
eamon316
23aee52bcd Feature/4606 (#4607)
* Issue #4606 (Spring) SubClass annotations are missing from the base class

* Issue #4606 (Spring) SubClass annotations are missing from the base class
   * Commit updated samples from ./bin/spring-all-pestore.sh
2017-02-03 22:30:32 +08:00
wing328
5282987851 [Python] update python requirement.txt and use single quote for safe characters (#4702)
* update python requirement

* update petstore sample
2017-02-03 21:35:40 +08:00
David Biesack
d1766e3fdf Fix Issue #4611 by using {{unescapedDescription}} (#4641)
* Use {{unescapedDescription}} in html, html2

This addresses https://github.com/swagger-api/swagger-codegen/issues/4611
Replace {{description}} with {{unescapedDescription}}

This is an improvement but because of issue #1203 and/or #3436 (fix not
yet impleented), Markdown is not being processed and converted to HTML.

* Add generated petstore samples index.html

* Copy unescapedDescription
2017-02-03 17:46:11 +08:00
wing328
a128c075ac Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-02 23:30:06 +08:00
wing328
f4fee61e83 update go petstore sample 2017-02-02 23:29:41 +08:00
Adnan Baruni
4b2c4f051b Issue 3914 (#4678)
* issue 3914, removed logic that remove header parameters. update template files to handle header parameters in the same manner as other parameters

* update swift and swift3 samples
2017-02-02 23:17:48 +08:00
Valentin Valchev
96ed41a29c Fixed issue #4665 [go] required object parameters are marked omitempty. (#4682)
* Fixed issue #4665 [go] required object parameters are marked omitempty.

* Run ./bin/go-petstore.sh as suggested by @wing328.
Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
2017-02-01 23:56:22 +08:00
Matan Rubin
8042f5ca3e [JAXRS-CXF] [issue #4386] add builder-style methods to model classes (#4468)
* [JAXRS-CXF] [issue #4386] add builder-style methods to model classes

before this change, model classes had only a default constructor and
setter methods, resulting in code like this:

    myModel = MyModel();
    myModel.setFirstField(firstField);
    myModel.setSecondField(secondField);
    return myModel;

this change adds builder style methods, such that the above code can be
written more compactly:

    return MyModel().firstField(firstField).secondField(secondField);

this is consistent with other JAVA generators in swagger-codegen.

* update jaxrs-cxf sample code
2017-01-31 23:07:12 +08:00
niku
f77bee8b8a [WIP] Add elixir client (#4675)
* Add elixir client

* Add test for elixir client

* Add shell script for generating sample codes for elixir client

It just copied from bin/bash-petstore.sh

* Make elixir-petstore.sh to generate sample codes for elixir client

* Add sample codes for elixir client
2017-01-30 17:40:55 +08:00
wing328
ae8a123484 [WIP][Scala] Finch generator (#3905)
* Feature/objc tasks 2.3.0 (#3522)

* change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber

* define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option

* integrate a workaround for a current JSONModel concurrency bug

* update to new ISO8601 pod

* add missing call to super

* integrate new templates into codegen

* updates documentation templates

* updates petstore objc generated code

* fixes objc client tests

* [ObjC] Add version define and share default headers of each client

* add finch generator and resource

* update license, add errros

* Fix problem with multitheard api client

* fix some errors for finch

* [finch] Remove license header

* [finch] Remove finatra stuff, fix a few issues

* WIP: Finch server generator

* [finch] WIP: server generator impl

This puts parameters (input/output) in the right format. Currently, this
is done in the generator class using vendorExtensions, but should be
refactored to imported templates to clean up.

Previous commits of the server generator output to appropriate
models/api directories. I've made no changes to this logic, but code
currently generates to the root scala package directory. This will need
to be fixed.

There's also an issue with circe's and Option[Date] in the Order type.
This issue will need to be resolved. As well, there's some unused
imports to clean up.

Initial implementation lacks support for custom imports, type mappings,
etc.

* [finch] Update api/model package and imports

* [finch] Explicit import/type mappings

* [finch] Regenerate example
2017-01-29 12:15:39 +08:00
Vlad Frolov
6890ef9755 [JavaScript] Fixed handling of empty arrays/empty strings/booleans/single numbers as valid API responses (#4653) (#4666) 2017-01-28 16:08:04 +08:00
Frode Danielsen
3236ade09d [Python] Improve model equality implementation (#4663)
* [Python] Improve model equality implementation

The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.

This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.

* Remove wrong auto-update of Python requirements
2017-01-28 00:42:53 +08:00
wing328
a45579d35e fix issue with pom.xml (spring cloud, boot) 2017-01-27 00:39:25 +08:00
jfiala
8952815b5f [Spring] Add beanvalidation annotations (#4600)
* update generated sample for spring boot #4091

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* update spring-cloud sample
2017-01-26 23:45:36 +08:00
Ainun Nazieb
05eea2436c [PHP] Validate parent's model first, if any (#4659)
* if model has parent, valid() & listInvalidProperties() will check the parents' first

* Run the ./bin/security/php-petstore.sh
2017-01-26 22:49:38 +08:00
wing328
c0fb30d491 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-26 17:14:23 +08:00
wing328
658b650285 Merge branch 'master' of https://github.com/karnik/swagger-codegen into karnik-master 2017-01-26 16:30:51 +08:00
jaz-ah
f592fdb23e [Swift] two fixes to latest param mapping code (#4587)
* two fixes: 1) extra ?'s at end of some url's 2) enums not being called out w/ rawValue to get the proper string name

* update samples

* one step closer

* closer implementation
2017-01-26 01:17:58 +08:00
Tony Tam
ecaa8b1ede tests, fix for #4647. Proper escaping project name per npmjs (#4648) 2017-01-25 17:08:54 +08:00
Jonathan Leitschuh
78f38f1a1f Add support for read-only values in spring model (#4629) 2017-01-25 16:34:55 +08:00
wing328
3be04e8a18 update JS petstore client 2017-01-25 16:08:22 +08:00
Tony Tam
3476e83a36 fix for allowable values, #4645 (#4646)
* fix for allowable values, #4645

* fixed string values

* rebuilt for #4645
2017-01-25 12:11:49 +08:00
Scott Williams
6e846e7463 Issue 4637 Fix for ci build (#4643) 2017-01-25 12:09:33 +08:00
wing328
9f8a1e27dd Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-23 19:00:31 +08:00
wing328
9abaab6bcf update ts angular2 petstore samples 2017-01-23 18:40:59 +08:00
keysolutions
933cc1ce9a Enum constructFromObject should return value (#4613)
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
2017-01-23 16:45:38 +08:00
wing328
e83646064f update js promise petstore sample 2017-01-23 16:00:23 +08:00
tharders
30315c8570 Fix Issue 4554 - handle 204 server response in javascript (#4604)
* issues 4554: Handle 204 response and handle deserialize exceptions

* issue-4554: generate javascript client updated template

Used petstore-with-fake-endpoints-models-for-testing.yaml

* use petstore-with-fake-endpoints-models-for-testing.yaml like sh script
2017-01-23 15:14:06 +08:00
wing328
8e71dfb512 Fix model prefix/suffix with incorrect camelization (#4621)
* fix camelized name with suffix/prefix in java client

* fix php model name with prefix, suffix

* fix indentation in ts abstrat generator

* replace tab with spaces in ts abstract generator
2017-01-23 01:29:11 +08:00
wing328
2e50a65a1c better handling of reserved words in models, operationId (#4620) 2017-01-22 17:41:35 +08:00
Tony Tam
7936cfc206 Merge pull request #4619 from swagger-api/issue-4618
Fix name mangling for JSON processing with QT5
2017-01-21 20:31:18 -08:00
wing328
5306b11b4a [java] Improve pom.xml to qualify for publishing to Maven central (#4616)
* [java] Attach Javadoc to artifact generation.

* [java] Attach source to artifact generation.

* [java] Add gpg signing to artifact publishing.

* [java] Add artifact URL to pom.xml .

* [java] Add artifact description to pom.xml .

* [java] Add artifact URL and description params to Jax RSS.

* [java] Add developer info to pom.xml .

* [java] Parameterise SCM info in generated pom.xml .

* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.

* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.

* update java petstore smaples

* camelize tag name, remove invalid file

* add back missing files for okhttp-gson

* fix docstring in java feign client

* fix docstring with various java api clients
2017-01-22 11:40:59 +08:00
Tony Tam
62caf7dac5 rebuilt samples 2017-01-21 16:33:14 -08:00
wing328
4d19fb6b2f hide generation timestamp for perl (#4614) 2017-01-21 19:12:51 +08:00
Damien Pontifex
1f0ecb5180 Updating typescript-angular to export api classes (#4589)
* Updating typescript-angular to export api classes

* Fixing tsconfig for typescript-angular test case
2017-01-21 17:02:11 +08:00
wing328
9a8ede4189 update php sample 2017-01-19 21:22:20 +08:00
Albert Morlan
ccb3385081 Set embedded templates directory when generating Javascript code (#4585) 2017-01-19 18:07:58 +08:00
Jonathan Leitschuh
36c3fa05e0 Allows for generation of spring controller code using the delegate pattern (#4439)
* Allows for generation of spring conroller code using the decorator pattern

* Change Decorator to Delegate in spring codegen
2017-01-19 17:58:39 +08:00
jfiala
6f4e82dc03 [Jaxrs-Resteasy] Add beanvalidation annotations (#4506)
* add beanvalidation to jaxrs-resteasy #4091

* replace tabs
2017-01-19 17:45:17 +08:00
wing328
157fcbc4aa fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
wing328
5f1b11827a Merge branch 'master' into master 2017-01-19 16:03:15 +08:00
wing328
a8afaa8f77 remove /r from templates 2017-01-19 15:53:51 +08:00
wing328
ccecc2aac0 new file for jaxrs jersey1 2017-01-19 15:31:24 +08:00
wing328
1ae60b1f61 Merge branch 'jaxrs_jersey_beanval2' of https://github.com/jfiala/swagger-codegen into jfiala-jaxrs_jersey_beanval2 2017-01-19 15:30:54 +08:00
jfiala
ee7f9fc56c [Jaxrs] Add beanvalidation annotations and fix outer Enums (#4492)
* add beanvalidation to jaxrs and add support for outer Enums #4091

* cleanup Codegen #4091

* cleanup samples #4091

* cleanup tabs

* updated samples to petstore.yaml (before petstore.json)

* add support for DecimalMin/DecimalMax/Min/Max #4091

* add check for hideGenerationTimestamp #4091

* replace tabs

* correct line endings to lf
2017-01-19 15:13:11 +08:00
Jim Schubert
da6b57f3fc [aspnetcore] use default in model constructors, supports enums (#4573)
* [aspnetcore] Use default rather than null in ctor

See original issue #3608

This adds same model constructor logic to aspnetcore as what was added
to csharp generator by PR #4145.

This doesn't include NancyFX because model construction relies more on
object initialization in that generator.

* [aspnetcore] ctor defaults + enum support

This follows up to #4145, and modifies model constructors to use
default(x) instead of initializing to nulls. default(x) works in all
cases using intuitive default values it is intended to support.

Example:

  csharp> public enum Color { RED = -1, BLUE = 0, GREEN }
  csharp> var color = default(Color)
  csharp> color
  BLUE

In the above example, The default of BLUE=0 is expected. For nullable
enums, this would be null as a default.

The aspnetcore generated code is also updated to support enums and
nested enums to account for changed to the petstore.yaml used to
generate the sample.

* [aspnetcore] Regenerate sample
2017-01-18 16:43:12 +08:00
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +08:00