forked from swagger-api/swagger-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Baikal14 #1
Merged
Merged
Baikal14 #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
….5 (swagger-api#6444) * fix bug to only remove CustomInstantDeserializer for play25 * revise logic * fix logic for CustomInstantDeserializer.java
* Supports of hyphen-case to camelCase * Add unit tests for the new section in the camelize function.
…wagger-api#6436) * [ANDROID][volley] Handle UnsupportedEncodingException in invokeAPI (Issue swagger-api#6432) The constructor of StringEntity can throw UnsupportedEncodingException, which is not catch nor thrown by createRequest method. Therefore the build of android client fails with: ApiInvoker.java:448: error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown This commit adds a try ... catch on UnsupportedEncodingException in invokeAPI methods and declare this exception to be thrown in createRequest * [ANDROID][volley] Handle UnsupportedEncodingException in invokeAPI (Issue swagger-api#6432) The constructor of StringEntity can throw UnsupportedEncodingException, which is not catch nor thrown by createRequest method. Therefore the build of android client fails with: ApiInvoker.java:448: error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown This commit adds a try ... catch on UnsupportedEncodingException in invokeAPI methods and declare this exception to be thrown in createRequest * [ANDROID][Volley] Handle UnsupportedEncodingException (Issue swagger-api#6432) Throw more precise ApiException
…eFormat (swagger-api#6448) * point readme links to canonical locations * use lenses for non-required model fields, instead of traversals * fix .gitignore generation * fix dateFormat cli option bug
…ields' cli option (swagger-api#6458) * update readme; remove unused DeriveAnyClass extension * refactor request/param utility functions * add strictFields cli option * add CONTRIBUTING.md
…#6335) * Issue#3829. [CSharp] Enabled inheritance to prevent property duplication when using allOf and discriminator * tabs removed * Petstore sample updated
…ction format arrays) (swagger-api#6463) * [Python][Flask] Upgraded connxion to 1.1.15 (now supports multi collection format arrays) * Was modified by ./bin/python-petstore.sh
* fix npe in swagger type (objc) * remove trailing spaces
* better logic to handle tag with special characters * update test cases * comment out swift test cases * restore the swift tests
This is the equivalent change in the swift4 module which was made in the swift3 module in this PR: swagger-api#6274 This updates AlamofireImplementations.mustache to handle when the response is an URL. It also makes changes in the generated sample code for: * default configuration (no promisekit or rxswift) * promisekit * rxswift Also, in order to build, the generated code needed to be updated with the change in CodableHelper which changes dataDecodingStrategy to ".base64" from its previous definition in earlier Xcode 9 betas. *
) Previously, we had implemented the Codable protocol by simply claiming conformance, and making sure that each of our internal classes also implemented the Codable protocol. So our model classes looked like: class MyModel: Codable { var propInt: Int var propString: String } class MyOtherModel: Codable { var propModel: MyModel } Previously, our additionalProperties implementation would have meant an object schema with an additionalProperties of Int type would have looked like: class MyModelWithAdditionalProperties: Codable { var additionalProperties: [String: Int] } But the default implementation of Codable would have serialized MyModelWithAdditionalProperties like this: { "additionalProperties": { "myInt1": 1, "myInt2": 2, "myInt3": 3 } } The default implementation would put the additionalProperties in its own dictionary (which would be incorrect), as opposed to the desired serialization of: { "myInt1": 1, "myInt2": 2, "myInt3": 3 } So therefore, the only way to support this was to do our own implementation of the Codable protocol. The Codable protocol is actually two protocols: Encodable and Decodable. So therefore, this change generates implementations of Encodable and Decodable for each generated model class. So the new generated classes look like: class MyModel: Codable { var propInt: Int var propString: String // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: String.self) try container.encode(propInt, forKey: "propInt") try container.encode(propString, forKey: "propString") } // Decodable protocol methods public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) propInt = try container.decode(Int.self, forKey: "propInt") propString = try container.decode(String.self, forKey: "propString") } } class MyOtherModel: Codable { var propModel: MyModel // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: String.self) try container.encode(propModel, forKey: "propModel") } // Decodable protocol methods public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) propModel = try container.decode(MyModel.self, forKey: "propModel") } }
* Also handles automatic escaping for reserved words, i.e. by default, no need to provide a mapping. Fix swagger-api#6498
…swagger-api#6508) * Backport kubernetes client features: - assert_hostname - connection_pool_maxsize - cleanups * Update petstore sample
* [QT5][CPP] Fixing issue with maps in models - Adjusted init function to init map correctly - Adjusted cleanup function to cleanup maps correctly * Fixed formatting for samples
* ContentType selection fix for csharp. Updated to reflect java implementation. Previously any request body of type string was having the content type overridden to 'application/json'. This prevented custom json ContentTypes * updated the petshop codegen for C# * Fixed content type selection test for csharp * Replaced tabs with 4 spaces * Removed trailing space / string comparison
* Prefix local vars to prevent conflict with params Fixes swagger-api#6698 * Update test snapshots
…#6712) * handle Alias models with newtypes * add inlineConsumesContentTypes cli option * generate swagger.yaml instead of swagger.json * check for/validate unhandled authMethods * refactoring
* * Fix apioperation annotation using generics in class reference for spring server generation * * Regenerate classes for new spring template
* Included Open Systems International in the list of companies using Swagger Codegen * Force Jackson to use the real names of the properties of the Data type defined in the YAML * Update of the Petstore CXF server sample * Update of the Petstore CXF client sample * Update of the Petstore CXF server annotated base path sample * Update of the Petstore CXF server non spring application sample * Changed {{name}} for {{baseName}} following the correction posted by @wing328 * Update of the Petstore CXF server sample
* Rust API client/server generator * `Future::boxed()` has been deprecated - replace with `Box::new(...)` * rebasing to rust * MMMLS211 use empty vec over none * MMMLS211 rebuild after merge from rust * MMMLS211 YAML array examples not wrapped in Some() * MMMLS211 Array parameters bad mustache fix * MMMLS211 don't parse map containers * MMMLS211 Tidy container types * MMMLS-211 rebuild example * MMMLS211 mvn rebuild * Percent-decode parameters contained in the path * Produce warnings when unknown fields are present We still accept unknown fields and discard them. However, to improve diagnosability, we now write a warning log and return a `Warning` header. Note that this is server-only * Markup * MMMLS211: Make optional arrays Options again * 211 markups * Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch * Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped * Fix rustfmt to the correct version * Fix rustfmt to the correct version * Add more response information to ApiError in client * Re-add missing brace * Code review markups * Allow converting out of wrapper types * Store arrays in new-types too * Use a new hyper_client every request * Add vec-like traits to array types * Xml support - new branch * Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted * MMSUB-172 Don't set Content-Type when there's no body. If we don't have a body we've serialized, then don't declare any content type for the nonexistent body. This is really important for 204 No Content responses, but it's also morally important for all other non-bodied responses. * MMSUB-172 Move to swagger 0.6. * Manually implement debug for the client * Allow `Context` to be bound to `Api`, and not passed on every function call * Support "." in parameter names * Support generate's "--reserved-words-mappings" option * Support "." in parameter names * Support generate's "--reserved-words-mappings" option
* rename rust2 to rust-server * update rust-server batch file to use petstore test spec
…st (swagger-api#6753) * rename request to $request * update examples files * rename $request to localVarRequest * rename oder variables to localVar...
* revert changes to fakes yaml the yaml currently includes invalid definitions that do not exist: ('#/definitions/xmlObject'). revert to known good yaml state. * update template creators
* Handle custom request.agent * better semantic
…d Client generation (swagger-api#6708) * Inclusion of API documentation in CXF Server stub generation * Inclusion of API documentation in CXF client generation * Update of the Petstore CXF server sample * Update of the Petstore CXF client sample * Update of the Petstore CXF server annotated base path sample * Update of the Petstore CXF server non spring application sample * Changed {{{appDescription}}} to {{appDescription}} to use the HTML-escaped value in handling special characters like <, > in the description following the correction made by @wing328 * Update of the Petstore CXF samples
Add my company to `Companies/Projects using Swagger Codegen`
* Updated api_client and configuration docstrings ApiClient: Removed host param, added configuration and cookie param Configuration: Docstrings are only read from the @Property decorated function, not the setter, moved the more descriptive docstrings from the setters to property functions * Ran bin/python-petstore.sh
* Replaced the method for updating path to prep for URL encoding. The new method will switch TypeScript-Angular variables from snake_case to camelCase in the URL generation. Imported StringBuffer, Matcher, and Pattern, since the new solution needs them. Some extra whitespace on blank lines was removed. * Since these were not up to date with the current master, I ran them and am commiting them here. This way, the changes are shown here instead of after future commits. * Simplified the code for the path conversion A LOT. New version is much simpler to follow, and very efficient - only one iteration through the length of the string. Removed regex Matcher and Pattern classes, since they weren't needed anymore.
* Removed commented code * Input validation is now supported as strict JSON validation * [PHP][Symfony] Improve the implementation Closes swagger-api#6614 * Generated code is tested to assure it compiles and updated README to dynamically load dependencies via composer * Updated shell script because shippable tests were failing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for breaking (non-backward compatible) changes.Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)