* Create 'bin/ensure-up-to-date' script
* Update shippable config
* Do no longer copy 'CI/pom.xml.shippable' to 'pom.xml'
* Fix paths in CI/pom.xml.shippable
* shippable: remove write to file
* shippable: move order
* Run 'bin/ruby-petstore.sh' to update 'samples/'
* Add Kotlin scripts to the list
The $@ option in bash doesn't make sense to come before `generate`
because the only option we can pass before generate cli usage is `help`.
System properties can be passed via JAVA_OPTS, so there's not really a
need for any intermediaries in the command line construction.
Having $@ at the end of the arguments list allows maintainers and users
inspecting options to quickly pass new options to a script. For example,
```
./bin/aspnetcore-petstore.sh --additional-properties sourceFolder=asdf
```
For command line arguments that may appear more than once in the
arguments list, this change doesn't provide any rules about overwriting
values that may exist (hard-coded) in the script. That is, in the
example above, if aspnetcore-petstore.sh already includes the
sourceFolder set to a different value, the "winning" value is up to the
options parser and openapi-generator-cli implementation.
* fix pistache c++ server in windows
* skip perl test
* comment out go tests
* Fix go test, manually fix go client
* fix rails batch file
* fix tab in java file
* install rust
* fix swift2-deprecated in windows batch file
* fix rust installation
* comment out js test
* update swift windows batch files
* update tizen batch script
* comment out ktor test
* various updates
* update pom.xml
* update ci config with new location
* Change "swagger-codegen" to "openapi-generator" in a comment
* fix pom.xml for bash client
* minor fix to github ID
* fix pom for ios
* fix python flask NPE with oas3
* update perl default value, fix example value
* update android sample, fix example value
* restore x-swagger-router-controller for nodejs server generator
* update default value for bash client, fix example value, invalid tag
* update default value for objc
* update objc pestore core data
* Fixes for ze-ph:
- fixed gathering of required properties for query data model
- fixed setting of internal vendor extensions for query data model detection
- fixed small typo in generated README
* Updated samples for ze-ph fixes
* restore elixir petstore original from codegen2x
* update elixir generator to work with oas2
* minor fix to elixir generato
* minor enhancement to templates
* update elixir petstore with oas2
* update rust client with petstore oas2
* update rust with oas2 petstore, fix default value
* fix type mapping for file, update api_doc for rust client
* update rust client with oas3
* restore pistache from codegen 2.x
* update pistache samples with oas2
* update pistache with oas3 petstore (no diff)
* restore datatype for array of model
* update pisache server scripts
* Revert "restore datatype for array of model"
This reverts commit 3b949a3873f3fca78311065173eda26e786dedec.
* fix array of models in method signature
* restore go server petstore from codegen 2x
* update go server petstore (oas2) - no diff
* update go server samples (oas3)
* add go petstore server script
* update dynamic-html samples with oas2
* update dynamic-html oas3 (no change)
* update html petstore (oas2)
* update html petstore with oas3
* fix example value for form parameters
* fix javadoc string
* update objc petstore with oas2, fix default value for parameter
* update objc petstore with oas3 spec
* update objc core data oas2
* update objc petstore with oas3
* update nodejs server oas2
* update nodejs server petstore with oas3
* update nodejs google cloud with oas2 petstore
* update nodejs server google function with oas3
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Jeremie Bresson <dev@jmini.fr>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Martin Delille <martin@phonations.com>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Improve: update sample tests automatically
* security test
* Update sample
- bin/php-petstore.sh
- bin/security/php-petstore.sh
The security test has not been updated for a while.
* Added support for application/xml content-type for GO language
Issue #7463
* Added test scripts for Go lang "withXml" feature
* Added samples for Go land "withXml" feature.
* "withXml" feature for Go language is only available for client.
* Rest-assured http client has been added
ApiClient has been added
@Deprecated has been added for operation
{{{returnType}}} has been fixed
build.gradle.mustache, build.sbt.mustache, api_doc_mustache has been added
Samples has been added for rest-assured
Useless supporting files has been removed for rest-assured
Sample has been added for rest-assured
* Tests has been added
* Doc and tests has been fixed, JSON.mustache moved to common
* Issue 7440 Added support for returning response in jaxrs-spec interfaces.
* Issue-7386 Updates samples for jaxrs-spec interfaces introduced in issue 7386.
* [tools] Make sed in new.sh more cross-platform
The -r option passed to sed is a GNU sed option for extended regex
evaluation. The -E option evaluates the same option, and is part of the
POSIX standard, meaning this option is available in GNU sed as well as
Apple's BSD variant.
This commit removes the need for users to install gnu-sed on Mac.
* [ktor] Initial ktor (kotlin-server)
This adds a very barebones implementation for a ktor server generator.
This supports metrics and typed locations. All endpoins are stubbed to
return HTTP/1.1 501 Not Implemented.
* [ktor] Initial sample
* [ktor] Adding options for select feature installs
Options available:
* featureAutoHead
* featureConditionalHeaders
* featureHSTS
* featureCORS
* featureCompression
* [ktor] Start of auth functionality
* [ktor] API key auth placeholder
* Add basic support for oauth2 configurations
ktor doesn't seem to explicitly accept oauth flow properties in its
configuration object. This may be a blocker for 'implicit' flow
definitions.
* Added example response objects
* [ktor] Route for apis with bodies, some cleanup
ktor locations are only supported for routes with path/query parameters.
Routes with body or file parameters must be declared with traditional
route api.
This commit also includes lambdas for simplifying processing in
library-based server generator code. As an example, ktor requires
lowercase http methods while spring (a potential future generator)
would require an uppercase such as HttpMethod.GET. It doesn't make sense
to modify these in the operations post-process method because that
format wouldn't be universally desirable.
The lambdas included in the KotlinServerCodegen:
* lowercase: converts all text to lowercase
* uppercase: converts all text to UPPERCASE
* titlecase: converts words (with configurable delim) to Title Case
* indented|indented_8|indented_12|indented_16: these helpers apply the
same desired indent to all lines of an included fragment's text.
* Fix some javadoc issues in lambda classes
* Update kotlin-server-petstore.bat
Change `kotlin` to `kotlin-server`
* Fix javadoc error messages in CI
* Build sample prior to code changes so differences are easier to decipher
* Add byte array type adapter for okhttp-gson (java8 only)
* Unit revealed that Gson (or GsonFire) defaults to escape = (equal sign) out of base64 string. Add disableHtmlEscaping() to gsonbuilder.
* Update specs and samples to include format=byte and include junit test of byte array serialization and deserialization.
* Implement recommendations by @cbornet including: Use okio.ByteString for base64 conversions instead of java 8 lib since the okhttp-gson client already includes okio. Remove setting to disableHtmlEscaping. Rename LocalByteArrayAdapter to ByteArrayAdapter.
* Update spec and sample for java okhttp-gson library client
* Undo addition of profilePhoto property. A format byte property is already available under the format_test definition.
* Put previously deleted tests back. Modified testFindPetsByTags() to verify exception since the server now returns a 500 for this request.
* Update test to pass when run against docker containerized server swaggerapi/petstore (heads up, this test fails if calling out to the internet published version of http://petstore.swagger.io)
* copy mustache templates from dart generator
* Start with generator by copying the DartClientCodegen for now
* at least we know this is not for a browser..
* First working version for a simple swagger configuration
* remove browserClient parameter, since it doesn't make sense for flutter
* Take care of complex types to support object hierarchies
* add null safety
* add small test for options
* add flutter-petstore scripts
* generate flutter petstore output
* Add new flutter test project
* move generated client to make it usable
* use generated swagger petstore plugin
* add support for lists of objects
* add DateTime support
* fix listFromJson implementation
* fix NPEs in DateTime operations + place order in sample
* Small readme changes
* bugfixes
* Use flutter-compatible implementation as default dart implementation
* fix generated samples
* Make lists serializable, now all dart test cases are working again
* better list implementation
* use StringBuffer
* removed FlutterClientCodegen
* fix browser client
* fix dependencies
* swagger-browser-client for browserClient testcases
* fix scripts
* removed flutter scripts
* add map support and simplify code via using .toJson contract
* remove unneeded devDependencies
* Regenerated samples
* fix call to mapFromJson, it is not a constructor
* remove pointless string serialization
* regenerated dart samples
* [erlang-client] fix body param from being included path and base path to remove host
* [erlang-client] move request logic out of api functions to utils module
* [erlang-client] add support for passing http client configuration to requests
* [erlang-client] update auth handling
* [erlang-client] remove underscore2, replacing with original underscore + replaceAll
* Initial commit, Generates everything necessary to run a performnace test against a swagger api. Just have to fill out the CSV feeder files with your data.
* adding samples and gatling-petstore.sh file
* Extending the AbstractScalaCodeGen
* Checking in the CodegenConfig file as it is needed to generate
* removing escaped reserved words
* Changed model to be able to make all variables utilize an underscore while json fields are still just the variable name
* Changing underscore to var as interpolation can not start with a _ in scala
* Fixing path params
* allow you to pass in a system property to define which config to use as a workload profile, use rate and instance multipliers to scale up and down your test, added ramp down after the test is completed, added global assertions.
* Addressing PR feedback
* missed semi-colon
* Bringing everything up to date with the renames that were suggested
This is the initial Codegen for Elm 0.18.
Please try it out and provide feedback.
Not yet supported:
* path variables;
* additionalProperties;
* authentication;
* recursive types.
* Added pkmst-microservice toolkit
* formatted
* replaces tab with blank spaces
* adding documentation folder
* adding documentation folder
* Update readme.mustache
Added feature set offered by pkmst
* updated readme
* Update io.swagger.codegen.CodegenConfig
Arranged pkmstServerCodeGen and SymfonyServerCodegen in aphabatical order
* Update readme.mustache
* renamed according to convention and added typeinfoannotation
* removed tabs
* updated codegen which extends abstractjavacodegen
* Added the script files and rectified the errors
* folder name changed and commons -lang3 version upgraded
* updated readme.mustache
* updated logging filter
* Added petstore to samples and updated the pom for the same
* Added java-pkmst sample to pom.xml.circleci
* updated readme.mustache
* Initial Commit
* Removed unneeded class, Updated names as per naming conventions, Removed licensing info from generated code
* Moved samples from client folder to server
* Fixed naming issue with scripts in the bin
* improved code format for api
* fixed compile issue and improved formatting
* fixed compile issue and improved formatting
* the result I want to obtain
* add csharp-petstore-net-40.bat for windows
* just ran bin\windows\csharp-petstore-all.bat
* Removed those directories:
- samples\client\petstore\csharp
- samples\client\petstore\csharp-dotnet2
then ran :
bin\windows\csharp-petstore-all.bat
* - update JsonSubTypes to 1.1.3 by using nuget dependency (the package is compatible with net40)
- allign all version of Newtonsoft.Json to 10.0.3
* the result of bin\windows\csharp-petstore-all.bat
* ran bin\security\windows\csharp-petstore.bat
* [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.