* fix a bug whereby OAuth intercept method calls itself forever
When the response is 401 or 403, the interceptor assumes that it is because of token so it keeps retrying the request with new token. However if the response status is due to the fact that authorization to the api endpoint failed, and not due to invalid token, then a recursive operation of updating token and re-requesting the failed request happens.
* change binary OR operator: | to normal OR operator: ||
although binary may work, it's unusual and likely was unintentional.
* 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