* trying an approach with providing asyncio as a framework.
* adding example of asyncio.
* removing sample client to help PR look more manageable.
* possibly fixing a unit test
* getting unit test to pass again.
* addressing comments.
* [java-vertx] make vertx client support running on different contexts
* [java-vertx] make vertx client support running on different contexts (samples)
* Removals of most of the warnings found by lint
* Removals of most of the warnings found by lint (PART 2)
* Removals of most of the warnings found by lint (PART 3)
* Removals of most of the warnings found by lint (PART 4)
* Removals of most of the warnings found by lint (PART 5)
* Fix conversion error
* Removal of unnecessary import. Other will need more complex login in the generator itself (not in the mustache files)
* Add missing imports + fix to the regex. Generation of the samples
* 1st commit of lua generator
* add petstore sample
* various fixes based on feedback
* better return handling
* check status code 1st letter
* add support for query parameters, auth, body param
* more fixes based on daurnimator feedback
* more fixes based on daurnimator feedback
* fix a few more issues found by luac -p
* use lower case for http header key name
* more fixes based on feedback
* update lua sample
* skip auto-generated readme, doc, test files
* use tab instead of 2-space
* fix container return type
* fix cast method call
* fix cast function call
* Fix issue #6100. Tested with all the samples.
* Fix multiple issue with the examples. Removing all of this.
Adding fake endpoint .sh but it is not compiling right now.
* add rust generator (1st release)
* update based on feedback
* fix reserved keyword
* fix string parameter
* Convert String to &str in trait definition
* Only pass pathParams to uri builder
* Fixed the html escaping in return type
* Fixed the hashmap constructor
* Added models into API scope
* removed models subimport, reference from super
* update returntype in method signature
* Fixed the remaining templates inconsistencies
* Fixed issues that floated up in kubernetes swagger file
* add hash support, fix docstring
* fix map parameter, update api.mustache
* use baseName for parameter
* use fully-qualfiied model name
* add rust tests
* fix test cases
* Rust gen slightly more idiomatic (#6247)
* Go -> Rust in README
* Remove leftover go file in rust sample
* rust: Regenerate sample
* rust: Rename *Impl -> *Client
* rust: one-line use line
More in line with common style
* rust: Replace tabs (in java) with 4 spaces
* Added trivial getter implementation (#6249)
* update rust petstore samples
Fixed typo in shell script
Added support for Outer Enums, inner enums not supported.
Added missing UUID library in ecf template.
Improved Model inheritance.
This change adds Objective-C compatibility for Swift Optional scalars in the swift4 language just like we added in swift3 here:
https://github.com/swagger-api/swagger-codegen/pull/6129
It also adds unit tests for the swift4 language. Currently those unit tests are the same as the swift3 unit tests, but will change soon as we iterate on the swift4 language generator.
Currently, in the swift3 language, if you have an optional integer, number, or boolean property in a model, then the generated swift3 model class might look like:
class SomeModel {
var someInt: Int?
var someFloat: Float?
var someDouble: Double?
var someBool: Bool?
}
This works fine if you are accessing this model only from Swift code. However, it is very common for iOS codebases to contain both Swift AND Objective-C. If you need to access this model from Objective-C, then those 4 properties are not accessible, since Optional scalars do not translate to Objective-C.
Therefore, in the swift3 language, we want to add some code for Objective-C compatibility:
1. We add a "objCompatible" boolean command-line option. If objCompatible=true, then this enables some additional code generation to make these types of properties accessible from Objective-C. If objCompatible=false, then the generated code is exactly as it currently is. The default is objcCopmatible=false.
2. If objCompatible=true, then for these types of Objective-C-inaccessible properties (Optional scalars), then we add a "x-swift-optional-scalar=true" vendor extension in the CodegenProperty.
3. Then, in the model.mustache template, if we see x-swift-optional-scalar=true, then we add an additional computed property which returns an optional NSNumber.
So, for example, when objcCompatible=false (the default case), then the generated code for the "declawed" property of the Cat model looks like:
open class Cat: Animal {
public var declawed: Bool?
...
But when objcCompatible=true, then it looks like:
open class Cat: Animal {
public var declawed: Bool?
public var declawedNum: NSNumber? {
get {
return declawed.map({ return NSNumber(value: $0) })
}
}
...
* Changes to allow field names as examples for string properties and multiple items in array during example generation
* Reverting the version to 2.3.0-SNAPSHOT and autogenerated petstore files
* Add polymorphism support for python
* Update api_client
* Remove leading spaces
* Bugfix
* Catch case where swagger_types is none but get_real_child_model is defined
* Added C++ generator for Pistache
* Revert of CodegenOperation
* Updated template
* Removed isRestful from method declaration
* Updated httpMethod variable
* Changed isRestfulCreate
* Updated pistache library name
* Update pistache petstore sample with the new library name
* removed typings for typescript-node language and updated typescript version
* updated sample of typescript-node by running .\bin\windows\typescript-node.bat
* More flexible subclassing of ApiClient possible by s/private/protected/g
I found myself in a situation where I needed to change the configured `Feature`s, but
because of all the private variables I was not able to do so. Perhaps this is a bit too
broad of a stroke, but I changed all fields and methods to `protected` instead of `private`.
In this way, future extensibility should be improved.
Also, to solve my particular problem, I added a new empty method called
`performAdditionalClientConfiguration` which will allow subclasses to add specific features,
or do anything else possible with a `ClientConfig`.
* Updated samples
Allow documentation to specify void when no
return type is available
Remove Xcode warnings:
"Documentation Issue
Empty paragraph passed to '@return' command"
* Fix issue 5460
* Handling only first and last double quote to support example with double quote in the middle
* Fix proposed by @ePaul
* Add comments to explain de fixStringModel function. Add an enum model called PetStatus that test this scenario. Update sample only for JavaPlayFramework generator
* Add automatic validation of return type when beanValidation is activated
* Small fixes for the automatic validation
* Add validation of entering body object + fix problem when receiving list + do not validate when the return value is a file
* [TypeScript][Aurelia] Create Aurelia code generator #5987
* Implement authentication methods for Aurelia #5987
* Support form data in Aurelia #5987
* Generate an index.ts file for Aurelia #5987
* Add return type to Aurelia model imports #5987
* Add Aurelia client options test #5987
Added shell scripts, batch files to generate Eiffel Petstore samples.
Added Setup CI (travis, shippable, etc) to cover the Eiffel Petstore samples.
Refactored part of the code into an Abstract Eiffel base class,
which can be later used in Eiffel server stub generators.
Added Eiffel Style guide to the contribution guidelines so that Eiffel contributors know what to follow in terms of code style
Fixed code generator issues.
Updated mustaches templates.
* Improve generated code in APIs so to use the most of Swift SDK
Improve generated code in APIHelper so to remove duplicated code and reuse existing checks
* run ./bin/swift3-petstore.sh
* Run ./bin/swift3-petstore-all.sh to update all the Petstore samples
* Restore old implementation and fix using .isEmpty in place of .count
* Run scripts to update pet store samples
* Reverte changes that use reduce
* Bug fixes on APIHelper template
* Fix build error in Xcode 9 beta 3, as .compact is no longer defined
* Add test schema for Swift 4 and associated script and config files
* Add test app for swift4Test.json schema
* Make integer, Integer, int, and Int32 types map to Swift Int type instead of Int32 type
* Add CodingKeys to model template, which allows us to serialize/deserialize variable names that are different than property names
* Make updates to Swift 4 test schema
* Fixes for unit test app for swift4Test.json Swift 4 test schema
* Major fix to the collection handling in Play Framework Generator
* Major fix to the collection handling in Play Framework Generator (small details missing from previous commit)
* Add the fix to header and form parameters too
* Fix to the default values. It did not take care of the "default" and also was setting to a bad default when not set.
* Just make a difference between string and non string instead of placing all types in the mustache file
* update pom to prepare 2.2.3 release
* add header support to qt5, update samples
* update version in java help
* update to xcode 9
* rollback to xcode8.2
The [java8 doclint](http://openjdk.java.net/jeps/172) rejects unescaped
HTML chars such as `<`, making some generated clients unbuildable with
java8. Seems a few property descriptions were using the `{{{` instead
of `{{` preventing those HTML chars from being escaped properly.
* Initial Eiffel Client code generator
TODO API and Domain model
* Updated EiffelClientCodegen to support Eiffel code style.
Added mustaches templates for models and apis.
The last one still under development.
* Updated templates, initial API generation.
Added client request template.
* Updated api.mustache style
* Updated code generation with a new directory layout.
Added test case generation, clean code.
* Updated Code generator, added apidoc and modeldoc
Updated readme file
* Added a Basic JSON Deserializer
Updated API client to support by default a basic json (de)serializer and let
the user customize then if needed.
* Updated Eiffel code generator to use Eiffel feature name style.
Updated templates to follow Eiffel style.
Improved feature descriptions.
* Added model inheritance support.
Removed unused code.
* Updated Eiffel code templates, refactor remove obsolte feature calls.
Added Eiffel sample in samples/client/petstore/eiffel.
* Updated Java code style.
* Fixed formating, using spaces instead of tabs.
* Updated EiffelCodeGenarator typeMapping.
Added TestCases for EfiffelClientOption and ModelTest cases.
Updated sample code to use the lastest changes.
* Restore keyword `nil' in Go Language.
* WIP: CodegenProperty with XML
* WIP: CodegenModel XML bits
* WIP: Jackson XML
* WIP: Java templating
* WIP: Java client withXml flag
* WIP: resttemplate work
* WIP: withXml only when Jackson is used
* WIP: Tabs to spaces
* WIP: java-petstore-resttemplate-withxml sample
* WIP: language: spring
* WIP: language "spring" using library "spring-boot" should include apiPackage in @ComponentScan to detect the API
* WIP: javax.xml for non-Jackson Java and enabled payload logging for jersey2
* WIP: updated java petstore samples
* WIP: JavaSpring with non-jackson XML
* WIP: bin/spring-all-pestore.sh
* - Added Restbed Generator
* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template
* Changed it to respect alphabetical order
* Made the string joining java 7 compatible
* Added samples
* Started work on restbed improvment
* - Updated samples
- Reworked Resource class names
- Added vendor extension for new formatted resource class names
* fix indention
* Fix error in Symfony models #5985
* Parse Symfony params #5985
* Implement auth metods in Symfony #5985
* Make "get" to "is" in Symfony's booleans #5985
* Use `camelize` instead of `initialCaps` in Symfony #5985
* Use File.separator instead of "/" in PHP/Symfony #5985
* Improve README generation for Symfony #5985
* Create an options test for Symfony #5985
* Add a swift4 client generator
* Updates per review comments:
- Changed Alamofire dependency from 4.0 to 4.5
- Added "Codable", "Encodable", and "Decodable" to list of reserved words in generator
- Ran "pod update" in default, promisekit, and rxswift samples test projects
Adding the possibility to generate java Vert.X servers.
It uses Vertx-Swagger-Router project.
It can generate an Async callback version or a Rx version.
* [Bugfix] Removed a debug print statement that sometimes caused crashes.
Change-Id: I62cf8d70faddfe855c7150927441465466dbaa53
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
* [Workaround/Fallback] Fix conversion of string representation of Json to JsonNode
Changed the conversion to consider any non-parseable string as a single "json string" object.
This is just a fallback to handle non-ideal server responses.
Change-Id: I5339d385e57b6225706fbaaaba1c04003c3810e9
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
* [Bugfix] Correct Handling of Non-String Value Types in Json Maps
Inside the Json Maps in server response, the earlier code was bugged if the "value" in the map was of a non-string type.
Change-Id: I8c34c7e9470fc0743b509917f8098b2ebe2bd4e5
Signed-off-by: Akhil <akhil.kedia@samsung.com>
* [BugFix/WorkAround] No "isPrimitiveType" in BodyParams
The "isPrimitiveType" value tells us whether the data type of a particular parameter is one if the primitive types.
This value is not present when iterating over all the body parameters, but is somehow present when
iterating over all parameters and filtering for only BodyParams.
Change-Id: I5b0a97e615b7300c33dc7f3d4673ad5e87c36f7e
Signed-off-by: Akhil <akhil.kedia@samsung.com>
* [Bugfix] Making Functions Static to Avoid Name Clashes
Multiple functions in different classes might named the same, hence leading to multiple functions of the same name.
Using static to have only internal linkage for these helper functions.
Change-Id: I97fb1dd64b176c4a2b95e6d923723469852bc85a
Signed-off-by: Akhil <akhil.kedia@samsung.com>
* [Enhancement] Minor Improvements to Documentation
Added Modules in Doxygen Doc, Improved MD documentation
Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
* Regenrated petstore sample
Update the petstore sample with newest template files
Deleted older sample in samples/client/petstore/tizen/client/
The old samples use oblsolete APIs
(These are APIs for Tizen 2.0, removed in 2.4, current release is 3.0)
Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
* [Bugfix] Fixes incorrect headers sent (#5980)
Regenerated the petstore as well.
Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
* fix: es6 style of Array inheritance to fix transpiler error
* fix: rebuild of promise-es6 petstore samples with fixed mustache
style: added space between classname and bracket
* style: rebuild javascript-all to reflect style changes in mustache
* 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
* First iteration of updating the typescript-jquery template/generator
* first RC of the new version of Typescript-JQuery using better models.
* Minor fix to the generation
* first RC of the new version of Typescript-JQuery using better models.
* Add an options for people using this client in a legacy app and that already have jquery loaded with a script tag somewhere
* Generation of the samples based on the latest changes from the typescript-jquery generator
* Fix to the check if the value is null and undefined
* Small fix when using collection
* updated Spring, Boot, Fox and Cloud dependencies
* run scripts for java, jaxrs-cxf and spring samples (although changes are not related to my changes)
* update jersey java8 petstore samples
* update java feign samples
* update java petstore samples
* add new files for java petstore clients
* roll back spring cloud dep version
* fix jaxrs-cxf error
* 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 feature option (#3819)
When you enable the feature useOptional the JavaSpring generator will use type Optional for non required parameters.
* Adds generated sample for #3819
* Adds generated sample for #3819
* Reverts commit for bean validation
* Adds generated sample for #3819
* Reverts commit for bean validation
* Fix alignment
* update spring samples
* update pom.xml to include spring use optional samples
* update artifactId to "spring-boot-beanvalidation"
* rpelace tab with 4-space
* check mvn task result
* Closes#5863
The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.
* Closes#5954
built and ran tests/samples
* - Added Restbed Generator
* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template
* Changed it to respect alphabetical order
* Made the string joining java 7 compatible
* Added samples
* fix java7 issue with apache
* NancyFx - Fixed bug in the generation of enum types in the NancyFx server, which cause enums to be generated as general classes, without the enum values and with compilation errors (#5910)
* NancyFx - Changes in the nancyfx sample after the updates in the nancyfx model.mustache template. (#5910)
* Closes#5863
The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.
* updated samples
* fixed tests for new CLI java8
* regenerated samples after master merge
* oops - left in an end tag after master merge
* rerun checks
* rerun checks
* - Added Restbed Generator
* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template
* Changed it to respect alphabetical order
* Made the string joining java 7 compatible
* Added samples
* Auto stash before merge of "master" and "origin/master"
* added missing apache2 config gen in services file
* - Added new Config Type
- Added Samples
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen
* - Added Samples
- Added new config type
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen
* updated versions
* match fix in 2.2.x branch
* updated with 73df07d64c
* regenerate pom.xml for jaxrs-cxf-petstore-server-annotated-base-path
* regenerate pom.xml for jaxrs-cxf-petstore-server-non-spring-application
* update dep for java jersey1, jersey2
* update sbt dependency for jersey2
* update dep for java okhttp-gson, resteasy, resttemplate
* update dep for java retrofit 1.x, 2.x
* update java petstore samples