* [csharp] Convert "false" properties to booleans
It appears as though "false" strings in additionalProperties are no
longer treated as false booleans. This may be an issue elsewhere, but a
simple fix is to always explicitly set the boolean value in a generator
class back to the additionalProperties map to convert boolean Strings to
boolean Objects.
* [nancyfx] Clean up async default option handling
* [nancyfx] Include asyncServer=false in sample script
* [csharp] Regenerate samples
* [csharp] Resolve .net 4 generation issues
Some functionality is missing from .NET 4.0, such as IReadonlyDictionary
and Type.GetTypeInfo().
This commit resolves compilation of generated .NET 4.0 code, requiring
no conditional versioning of Newtonsoft.Json.
* [csharp] Regenerate .net 4.0 sample
* [csharp] Resolve .NET 4.0 sample compile
Sample build.sh wasn't accounting for targeting different FCL correctly.
That is, when passing "net40" to the -sdk option, it would use the
default -sdk:4 and -langversion:6. These don't necessarily match with
what is installed on a machine with only .NET 4.0 (which is our targeted
use case here).
To resolve, we need to define another version-specific value for passing
to the mcs -sdk option (see man mcs for details).
This option currently isn't overridable in the client codegen class.
Also, langversion is set specifically to the version of C# available to
the targeted SDK version. If there is need, we may extend this to
something like:
langversion=${MCS_LANG_VERSION:-6}
To allow users to run as:
env MCS_LANG_VERSION=5 sh build.sh
I haven't done this because I doubt there's much of a use case via this
script. I'm assuming most consumers will build via IDE or MSBuild.
* [csharp] Revert bin/csharp-petstore.sh to 3.5
* [csharp] Regenerate .NET 3.5 sample
* [csharp] Resolve nuget issue with existing files
* [csharp] Update -all.sh, regenerate samples
* WIP: initial commit for Erlang client generator
* add models types and function type specs
* fix type specs when models are the type and support QS lists
* make method lowercase in postprocessoperations
* add model encode function
* add erlang client sample
* add windows client sample script
* proper return type spec and handle return error messages
* Add support for the google-api-client
* When there's no return type, just return (no parsing the response)
* Update the deserialization to use a Jackson typeref.
* Delete the auth mustache files as we don't need them
* Stop generating unneeded auth files; get SBT/gradle working with the generated module
* Add builder-style methods to the google-api-client ApiClient for getting API instances
* Update the README to reflect the new client library option
* Generated overloaded methods to send query params as a Map<String, Object>
* Add files for Sample codes
* Add type in angle brackets to support Java 6
* Required query params must be added to the Map of params. Update sample code.
* Use explicit types instead of diamonds to support Java6 in one more place.
* Clean up javadoc warnings in generated code / remove pointless return statements
* Clean up extra newlines in generated code
* add support for async routes/endpoints
you can now set --optional-properties async=true to generate
a nancyfx server stub that uses asynchronous programming.
(cherry picked from commit 126869cb0b967e8063417e11993cf6326ce8ffd4)
* add nancyfx-petstore-server-async.sh to generate sample of async nancyfx.
* Rename async => asyncServer
* update bin/nancyfx-petstore-server-async.sh
* rename async => asyncServer in api.mustache + small bugfix
* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh
* remove additional new line in api.mustache + add space after if
* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh
* Add addiitional files from upstream
* Remove mis-added files
* Swift3: Properly percent-escape path parameters
This change fixes the following issue:
https://github.com/swagger-api/swagger-codegen/issues/6400
The problem was that path parameters were not properly percent-escaped before being placed into the URL path. This leads to creation of an invalid URL, which then fails.
So therefore, in the API template where path parameters are handled, we propertly percent escape them, using the characters which are allowed in URL paths.
In addition to this template change, then this PR includes the following changes:
1. Resulting changes in all generated code due to the above template change.
2. I added the objcCompatible run to the swift3-petstore-all.sh so that I could re-generated all of the generated code with a single script.
3. I added a unit test in UserAPITests.swift which verifies that paths are properly escaped.
4. In order to make the unit test work, then I needed access to RequestBuilder<T>.URLString to verify that the path was properly escaped. However, RequestBuilder<T>.URLString had "internal" access control so it was inaccessible from the unit test. So therefore, I made four contants in RequestBuilder<T> to be public. This should not harm anything, since they are constants ("let's") and cannot be changed from the outside of the class after initialization.
5. There were also some stray changes which look like they were caused by having not run bin/swift3-petstore-all.sh in a while.
* Added v4/v4.3 to typescript-angular-petsotre-all and renamed from angular2 to angular
* refactored typescript-angular-petstore-all.sh
* changed profile id for typescript-angularjs to properly have angularjs instead of just angular.
* Spacing at end of model template
* Corrected backwards compatible enum typing
* Removed commented code
* Input validation is now supported as strict JSON validation
* [PHP][Symfony] Improve the implementation
Closes#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
* 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
* Adding a Scalaz codegen client
* Fixing imports and removing commented code
* Adding the bash file and updating the Pet store samples for Scalaz.
* Finalizing Scalaz generation so that it works for the Petstore.yaml
* Removing some unnecessary files and comments
* Removing some files that were accidentally generated for the wrong Scala
* Adds the ability to create code for an interface-based jaxrs client.
* Adds shell script and sample files for jaxrs-spec-interface
* rebase into adds shell
* Fixes bug in creation of Produces/Consumes in method annotation. Allows for instance "application/json; charset=utf-8"
* Fixes generated pom.xml
* Generate pom.xml by default
* Prettier output from api.mustache
* Fixes bug in mediatype, allowing charset-specification in swagger.yaml.
* Merges generation of interface-based jaxrs client/api into jaxrs-spec.
* Moves jaxrs-spec server interface to match location of jaxrs-spec server
* Makes Generated-annotation in genereated classes slightly prettier.
* Add Ada client petstore samples
- Add script to generate Ada client support with swagger-codegen
- Add files to build the Ada sample
- Add main program to use the generated client samples API
and connect to the server to perform some operations
* Add some description for the samples
* Update the documentation to explain how to build, how to use the generated Ada client code
* CsharpDotNet2Client - Use clientPackage in additionalProperties if provided
* Give execution rights for csharp-dotnet2-petstore.sh
* Fix generation of C#.net2 apiPackage, modelPackage, clientPackage
* Fix modelPackage property missing when generating models
* Initialize clientPackage in constructor
* fix compilation error in eclipse
by updating package declarations in moved files
(eclipse validates that package and folder names match)
* permit specifying the full angular version
simplifying the templates by moving trivial case splits to the model
* remove dead code
this method is never called ...
* support HttpClient in addition to Http, clean up generated code
Fixes#6080
* added new sample, and regenerated existing samples
* updated samples
this time with the freshly build generator ...
* improve formatting
* updated samples
* fix compilation error in generated code
the overload for blobs does not have a type parameter
* added the first test for the utils package
* fix extra trainling commas in function argument lists
* regenerated samples
* [csharp] Explicitly set supportsInheritance
* [csharp] set supportsInheritance for client
This includes supportsInheritance only for the client codegen at the
moment, because setting in AbstractCSharpCodegen would require the
change to be tested in all derived generators, possibly including
similar template changes to this commit's.
* include nice improvement of https://github.com/jimschubert/swagger-codegen/tree/csharp/3829 and leverage https://github.com/manuc66/JsonSubTypes for subtype deserialization
* remove duplicate base validations
* remove useless tests
* restore documentation for properties coming from parent
* launch bin/security/csharp-petstore.sh
* it's impossible to call an explicitly implemented interface-method on the base class
(https://stackoverflow.com/questions/5976216/how-to-call-an-explicitly-implemented-interface-method-on-the-base-class)
* restore portion of code that was lost
* regenerate more
* fix missing using
* take the multi .net compatible revision
* keep generated model simple when no hierarchy involved
* regenerate with:
- bin/csharp-petstore-all.sh && bin/security/csharp-petstore.sh
- bin/csharp-dotnet2-petstore.sh && bin/csharp-petstore.sh && bin/csharp-petstore-netcore-project.sh && bin/csharp-petstore-net-standard.sh && bin/csharp-property-changed-petstore.sh
* fix sln indentation and the missing windows runner for dotnet2
* fix inheritance GetHashCode and Equals
* override instead of hiding the base method
+ fix the csharp-property-changed-petstore.bat
* By default the value of the discriminator property must be the name of the current schema
* Add test for subtype deserialisation from parent type
* add missing '.bat' and use the 'call' template from javascript-petstore-all.bat
add missing file to trigger it on windows
* fix default value bug
* cleanup copyright information
* formatting after merge
* fix merge
* applying bin/csharp-petstore-all.sh
* applying bin/security/csharp-petstore.sh
* add r client codegen
* update r api, model templates
* various fix
* rename Json to JSON
* more enhancements
* fix json handling
* add file upload support, var name to handle hyphen
* use httr::upload_file
* Use the right package name for the Rust crate.
* Change getters on models to return Option for non-required fields.
* Cleanup Rust generation and get example compiling again.
* Use underscore names for functions.
* Implemented support for Play! 2.5.x / java8
* Added petstore sample for play25
* implemented play25 support
implemented version switch via playVersion config option
* fixed compilation failure after merge
* Disabled generation of CustomInstantDeserializer if dateLibrary equals to java8
* Rrename for angular and angularjs to reflect naming guidelines
see http://angularjs.blogspot.com.au/2017/01/branding-guidelines-for-angular-and.html
- move makes typescript-angular -> typescript-angularjs
- move makes typescript-angular2 -> typescript-angular
Language string with generate was already this so generation shouldnt change
but class naming follows this convention now
* Fixing merge problems
* Support additionalproperties and more.
- Upgrade to TypeScript 2
- Use type definition from npm instead of typings, typings is deprecation
- Use Enum instead of String Literal Types
- Use typescript es6 lib for target es5
- Support additionalproperties
- Support JSDoc
- Add snapshot and npmRepository option
- Update typescript-fetch run script for linux
- Create typescript-fetch run script for windows
* Update and fix
- Fix circle run script
- Fix duplicate query parameter
* Rename typescript-fetch folder to lowercase
* Fix for review and update new line end of file
* Fix end of file
* rename script to {lang}-petstore-all.sh and fix test
* Fix override query string
https://stackoverflow.com/a/7517673/1077943
* 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.
* 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.