* Add overloads on signals.
The overload adds the NetworkError and the error string to the signal. Both signal will be emitted. Clients are supposed to subscribe to only one of the overloads.
* refactor generated code alignement
* Do not use method overload for signals. Instead, have another naming convention for signal that carries Error information.
Why ? Because signal overloading and QT5 connector with method referencing do not mix well (see http://stackoverflow.com/questions/16794695/connecting-overloaded-signals-and-slots-in-qt-5). It would need to specify exactly which overload to take. That is cumbersome to write AND is a breaking change for the consumer of the generated code.
* update qt5 sample files
* Added code to templates to ensure generation of code for Swift3 that builds on both Apple platforms and Linux. Fixed a bug in the Model decoders that prevented code from building for Linux
* Ran the script to generate the PetStore API
* Added PowerShell module. See #4320
MVP PowerShell module to serve as a template for a PowerShell generator.
* Fixed function name
* Removed module manifest
It should be generated by the build script
* Ignore module manifests
* Removed binding from prop. name for Pet
This is the result of
- `$ git checkout master`
- `$ bin/run-all-petstore`
No change was made to the code, just ran the aggregate sample generation
script.
query_params is a list of tuple, so defined it as a list by
default instead of a dict.
This fix below issue on the client side.
Traceback (most recent call last):
File "test.py", line 13, in <module>
api_response = api_instance.seek("the")
File "python-client/swagger_client/apis/seek_api.py", line 168, in seek
(data) = self.seek_with_http_info(recherche, **kwargs)
File "python-client/swagger_client/apis/seek_api.py", line 245, in seek_with_http_info
collection_formats=collection_formats)
File "python-client/swagger_client/api_client.py", line 323, in call_api
_return_http_data_only, collection_formats, _preload_content, _request_timeout)
File "python-client/swagger_client/api_client.py", line 135, in __call_api
self.update_params_for_auth(header_params, query_params, auth_settings)
File "python-client/swagger_client/api_client.py", line 512, in update_params_for_auth
querys.append((auth_setting['key'], auth_setting['value']))
AttributeError: 'dict' object has no attribute 'append'
Signed-off-by: Gregory Herrero <gregory.herrero@gmail.com>
* add withCredentials to the configuration
1. `withCredentials` in Request is `false` default
2. if want to set the `withCredentials` as `true` (for CORS request),
instance `Configuration` object and set the `withCredentials` as `true`.
* simplify the code according to the code review
* remove trailing space in cpprest, update samples
* add android batch files, better code format, sync petstore.json with
petstore.yaml
* restore petstore.json and sync it to petstore.yaml
* update circleci pom.xml
* add new android files
* add new android files
* Converting to constructor based injection
* Correcting spelling mistake
* Adding the bean for ObjectMapper
* Adding files modified by running the petstore scripts
* Adding final qualifier to objectMapper variable in apiController mustache
* Add support to UUID type
* Simplify and use a simple QString instead of a QUuid.
Work for using a QUuid is way larger than supporting QString (imply modifying multiple c++ templates).
Current needs are fullfill with the use of a simple QString, so I let the use of QUuid for future enhancement.
* - add windows executable for generating qt5 security samples
- update sample clients
PS : some modifications on the samples are not related to the patch I applied. Were the samples up-to-date ?
* [JAVA/] jaxrs/jersey2 (Issue: 4662) Made java8-date codegeneration to work with jersey2
* Ran shellscripts for jaxrs-jersey-petstore-server and java8-petstore-jersey2 to update petstore samples
* Updated the Petstore samples
* This change uses std::stringstream for string conversions instead of std::to_string(). Android doesn't yet support std::to_string(). This should fix#4632
* Add support for Spring's RestTemplate in Java client codegen
Resolves#1176
* Update all Java samples to include change for Jackson enums
Currently enums are deserialized from a String value with an
explicit @JsonCreator. However, they are not being serialized with
this String value. This change introduces the @JsonValue annotation
on the toString() method of enums, so they will be serialized as a
String with the correct value.
* Rewrite of Go Client
* Revert to older version of context.Context
* Clean and bulk up concurrency test.
* Correct {{path}} to {{{path}}}
* change custom date type to string.
* Add APIKey authentication
* Correct missing line from resolving conflicts.
Correct missing line from resolving conflicts.
* use py3 instead of py34
* fixed test to test invalid enum
* ADDED: assign variable in the ctor with property setter to check validity if possible. CHANGE: move required property check to proper place. CHANGE: remove double quotes from allowed_values for none-string enum property
* rebuilt samples
* comment for improvement
* ADDED: post process enum model for python.
* comment
* rebuilt samples
* rebuilt samples
The generation code was ignoring top-level aliases for any language config that
contained "java", which included "javascript", a completely different language.
Changed this to be those configs based on the JavaAbstractGenerator class.
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.
definitions:
JustABoolean:
type: boolean
This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.
This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.
This functionality currenlty only applies to Java, but could be extended to
other languages later.
The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
* Fixed classFilename in typescript-angular and recreated samples
* Changed classname to classFilename in ts-angular2/models.mustache
Also recreated ts-angular2 sample
Commit e3d04ee01 (issue #5240) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.
Also updated the affected samples using the various scripts in bin/.
* set list to null in java if not required
* update petstore sample for java server stub
* update sample for msf4j
* add null assignment to new list/map in java
* reimplemented basic requests with httpplug
* added returning headers
* added query params support
* removed constant reference to model class
* some extra @throws; form params
* form and query params encoding
* file upload / form multipart
* added missing response headers in WithHttpInfo calls
* removed Store test From PetApiTest class
* removed configuration overriding test as its now task of client adapters
* updated store tests with new client initialization code
* updated composer.json template
* not using json_decode if response is string
* renamed some variables to camelCase
* removed ApiClient and Configuration classes
* added HeaderSelector template
* added ObjectSerializer injection
* regenerated all samples
* added AuthConfig and readded support for custom api keys
* readded support for oauth tokens
* readded basic auth; moved auth tests to separate test class
* readded header params
* readded support for collections in paths
* readded config option; readded exception handling
* file downloading; readded some Configuration properties removed earlier
* readded default headers
* made responses and return types work same way as earlier
* made all methods static in ObjectSerializer
* updated test.php, replaced autoload.php with composer's autoloader
* updated api doc template
* removed classes used for testing; regenerated Fake_classname_tags123Api
* replaced httplug with guzzle6
* updated required php version to 5.5
* clean up
* readded missing userAgent feature; removed default headers from Configuration
* updated test.php
* downgraded phpunit back to 4.8 to work with php5.5; fixed client initialization in some tests
* Add async support to scala client.
* Format api endpoints.
* Modify build.sbt.
* Change date format and pass StoreApis tests.
* Add StringReader and StringWriter to support string serialization/deserialization.
* update petstore samples for scala clients
* Update maven and gradle dependency. Update tests to pass compilation.
* [Swift3] Fix bug where non-camel-case path params didn't work.
* [Swift3] Fix bug where int enums generated non-compiling code. Swift3 integration tests now pass.
* [Swift3] Add a non-camel-case path parameter to petstore-with-fake-endpoints-models-for-testing. This would have caused the Swift3 tests to be broken before 7387e49fef56a624045aa52b65ffb9c19b3853ec.
* Support Swagger collectionFormat encodings in Feign
Feign only natively supports the "multi" collectionFormat for encoding lists
of parameter values. This change adds manual encoding of the other formats, such
as "csv" (the default for collections), "tsv", space-separated, and pipes.
* Fix typo in anchor tag.
* [#5172] Allow vendor json media types
* Revert unnecessary diffs
* Update petstore sample
* Didn't run mvn after some edits
* Rerun ' ./bin/java-petstore-all.sh' and './bin/security/java-petstore-okhttp-gson.sh'
* Added more realistic test cases for isJsonMime
* Updating samples after #5232.
* Fix tests after #5232.
* Fix Javascript client tests.
* JaxRS server: set serverPort only when not given from outside.
* Update JaxRS sample creator scripts to fix serverPort.
* Preliminary test fix for JaxRS server generators.
* Updating samples for JaxRS with Jersey1/2.
* Updating JaxRS samples again.
In the convenience class defined for generating a Map of query parameters, the
parameter name was mistakenly being set to the Java variable name, not the
actual parameter name. These are often the same, but can be different in the
case of multi-word parameters, such as in the sample API's `enum_query_string`
vs `enumQueryString`.
* Update samples for java/jersey2-java6.
* Let the sample generation script set the right name for jersey2-java6.
This is the equivalent change to #5095, for jersey2-java6.
* Update samples for Java/Jersey2-java6.
* use builder pattern for operations
* @QueryMap parameter only for query parameters
The previous iteration had replaced all parameters (body, path, query, etc)
within a single @QueryMap. But Feign only supports this style of parameter
passing for query parameters. Besides, for the case of a body parameter (like
soxhlet uses) it only added extra verbosity. With this change, the query
parameters are gathered together in a single @QueryMap and the other parameters
are left alone.
* Adding template for generating test code
* Make javadoc consistent with rest of file's conventions/indents
* Update samples
The files in src/main were generated by running
$ bin/java-petstore-feign.sh
The files in src/test were manually fixed.
* Correct capitalization of @QueryMap class in feign
Adds a field operationIdCamelCase (a la operationIdLowerCase) to the
CodegenOperation container and uses it in the feign-generated classes
with @QueryMap parameters. Also re-generated the feign samples.
* Adding hyphen to javadocs for extra readability.
* Adding (not replacing) api method with @QueryParam overload.
In order to keep backwards compatibility, switched to adding a new method to
the interface instead of replacing the old call.
* Adding newline to generated source for readability.