* Fix NullPointerException for info.version on Javascript client codegen
* Set/Return project default version to 1.0.0 if info.version not found
* info version null check handled and default version/appVersion value set to 1.0.0
* Removed null check for info version. Fixed DefaultGenerator code to handle null check.
* Semicolon added missing
* 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 ?
* Fix NullPointerException for info.version on Javascript client codegen
* info version null check handled and default version/appVersion value set to 1.0.0
* Removed null check for info version. Fixed DefaultGenerator code to handle null check.
* semicolon added missing
* [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
* Adds Valid annotation for request body (#4847)
If useBeanValidation is active, this change will add Valid annotation to ReqeustBody
* Adds generated samples for bean vaildation in spring boot (#4847)
* Adds Valid import to Controller
* Adds generated code for bean validation change
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
* Add option to skip Maven plugin execution
The execution is skipped if either the codegen.skip property or the <skip>
configuration parameter is set. This is consistent with how many other Maven
plugins, such as maven-exec-plugin and maven-clean-plugin, handle this.
* Add documentation for Maven `skip` property
* Fix environment variable support in successive Maven plugin executions
System properties were retained across multiple successive executions,
resulting in unpredictable behavior. Property values are now properly reset
to their original value after plugin execution.
Fixes#5350
* Add explanation to environment variable reset mechanism in Maven plugin
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Return a FileInputStream when the returnType is "file" + Fix a couple of other bugs with boolean + updated sample
* Return an InputStream instead of FileInputStream (except in the instantiation)
* A little cleanup for the form param of type file.
This is for the EAP version specifically.
* The JacksonConfig class always used the io.swagger.api package
* The RestApplication class did not import the service implementations
from the correct package
* Added shell script for generating test applications
* 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.
* Migrate from Swashbuckle to Swashbuckle.AspNetCore
* Fix typo
* Add SwaggerResponse for all responses
* Remove model constructor
* Add required attribute if available
* Improve whitespace and remove some redundant code
* Remove redundant code from Dockerfile
* Add disable warning 1591 pragma for model utility methods for bringing down compiler warnings to zero
* Add proper model state validation before controller is called
* Regenerate AspNetCore PetStore sample
* [#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
* 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.
This change enables top level enumeratons to be written out as:
export type SortDirection = "Ascending" | "Descending";
vs.
export class SortDirection {
}
* Pretty-print swagger.json.
(This was done via `jq`. In a later commit we'll generate it pretty-printed.)
* Erlang Server: pretty-print generated swagger.json.
* Update samples for Erlang-server.
* Issue #3084: add hideGenerationTimestamp option to Go server generator.
* Issue #3084: use hideGenerationTimestamp in go server sample script.
* Update Go server samples.
* [JAXRS-CXF][#4776] Respect query params default values in generated interfaces
Before this change, the generated interface ignored default values of query
params. Now, it adds the proper @DefaultValue annotation.
See issue #4776 for example.
* [JAXRS-CXF] Update samples
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* - Add "wrapCalls" and "useSwaggerUI" CLI Options and updated what handleException does to follow Play Framework lifecycle more closely
- Updated all mustache files accordingly
- Updated the sample
- Updates Play Framework version to the latest 2.5.13
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`.
* Sync with upstream/master
* Support Markdown in -l html
Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)
Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml
* Support Markdown in -l html
Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)
Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml
* 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.
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Add an CLI option to generate interface. These interfaces are implemented by the controllerImp and help to generate the code with an IDE like IntelliJ because on updates of the code the controllerImp must follow the contract of the interface. If it don't, IDE will provide support to generate missing functions or parameters. I also did some cleanup of options we don't use in Play Framework.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Small fixes
* Remove everything related to swagger-play. No need for annotation anymore because we export the swagger.json directly and show the documentation using swagger-ui with the direct path. Also added the sample.
* Remove/Rename paramsX mustache because there is no more documentation. Remove unused file. updated sample
* Fix the problem with default values that was not set correctly.
* Small fix related to bad merging
* Add handleException CLI options
* Fix default values once and for all!
* Update sample files + fix bug
* Fix bug with body that is required and have a list as a parameter + add bean import for interface to prevent compilation error
* added supporting files for Dockerfile and dockerignore generation for python-flask lang
* documenting how to build the docker image and how to spin up a container
* updating pet store sample
* fix#2159 dataformatter error for iOS Swift
When trying to parse 24-hour time to 12-hour time, date formatter throws fatal error.
It's caused by lack of settings locale for date formatter.
* update sample code
* #4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations.
* Reworked the order in which template files are searched for:
- 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file
- 2nd it will check for the file in the specified <template folder> folder
- 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file
- 4th and last it will assume the file is in <embedded template> folder.
Added unit test to test template dir overloading.
* [CsharpNetStandard] Added C# .NET Standard Client Generation
Added language CsharpNetStandard.
Everything copied from csharp Client Generator.
Dependancies switched from Restsharp to Restsharp.Portable.
Changes made where nececary to replicate Restsharp functionallity.
Project type changed to .NET Standard protable library.
* [CsharpNetStandard] Removed client prop validation due to incompability
* [CsharpNetStandard] Minor fixes
Changed leftover RestSharp.Method to Method
Changed to .Net Standard 1.3 for compability reasons
Changed excludeTests to default to true due to tests not being implemented yet
Removed unnecessary targetFramework property
Removed leftover UWP stuff
* [CsharpNetStandard] More fixes
Added correct dependencies to Readme
Added correct supported frameworks to Readme
Added slightly better placeholder for installation instructions in Readme
Removed leftover dependencies from project.json
Removed leftover SupportsAsync stuff
Removed references to build.bat/-.sh since they're not yet being generated
Todo implement test generation
* [CsharpNetStandard] Added forgoten git_push.sh
* [C#-netstandard] Renamed option to csharp-netstandard
Also added .bat file for test generation
* [C# Net Standard] fixed path in .bat file
* [C# NET Standard] fixes to enum generation
Fixed issues with enum generation due to tired programmer
* [C# NET Standard] Generated sample client library
Sample library generated
Fixes:
Class actually works again
.bat - minor inconsistency fixed
* [C# NET Standard] Error corrected in how timeout is set
Configuration Timeout property changed to TimeSpan type and code corrected around that
* [C#] Merged .NET Standard generator into csharp generator
Functionallity of csharp-netstarndard generator has been moved into standard csharp generator under the targetFramework option as "v5.0"
This was previously missing and I don't think it was intentional.
It appears that swagger-codegen is already correctly processing
the yaml and the placeholder in the template was the only thing
missing.
* Swift3 enum: number variable names fix
Swift3 generator: added 'number' prefix to enum variable names that start with a number
* Fixed Swift3 enum variable names starting with number (prefixed with '_') and added test cases
* Swift3 enum var names: made sure to keep the next word after a number in lower case
* Update samples for nodejs + nodejs-google-cloud-functions.
* Fix example generator to use deterministic randomness.
This avoids changing results after each generation, and makes diff reviews easier.
* Update NodeJS samples.
This is the last "randomness" update. From now on the samples should only change if either the generator, the input or parameters change.