* 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