* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Add an CLI option to generate interface. These interfaces are implemented by the controllerImp and help to generate the code with an IDE like IntelliJ because on updates of the code the controllerImp must follow the contract of the interface. If it don't, IDE will provide support to generate missing functions or parameters. I also did some cleanup of options we don't use in Play Framework.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Small fixes
* Remove everything related to swagger-play. No need for annotation anymore because we export the swagger.json directly and show the documentation using swagger-ui with the direct path. Also added the sample.
* Remove/Rename paramsX mustache because there is no more documentation. Remove unused file. updated sample
* Fix the problem with default values that was not set correctly.
* Small fix related to bad merging
* Add handleException CLI options
* Fix default values once and for all!
* Update sample files + fix bug
* Fix bug with body that is required and have a list as a parameter + add bean import for interface to prevent compilation error
* added supporting files for Dockerfile and dockerignore generation for python-flask lang
* documenting how to build the docker image and how to spin up a container
* updating pet store sample
* fix#2159 dataformatter error for iOS Swift
When trying to parse 24-hour time to 12-hour time, date formatter throws fatal error.
It's caused by lack of settings locale for date formatter.
* update sample code
* #4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations.
* Reworked the order in which template files are searched for:
- 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file
- 2nd it will check for the file in the specified <template folder> folder
- 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file
- 4th and last it will assume the file is in <embedded template> folder.
Added unit test to test template dir overloading.
* [CsharpNetStandard] Added C# .NET Standard Client Generation
Added language CsharpNetStandard.
Everything copied from csharp Client Generator.
Dependancies switched from Restsharp to Restsharp.Portable.
Changes made where nececary to replicate Restsharp functionallity.
Project type changed to .NET Standard protable library.
* [CsharpNetStandard] Removed client prop validation due to incompability
* [CsharpNetStandard] Minor fixes
Changed leftover RestSharp.Method to Method
Changed to .Net Standard 1.3 for compability reasons
Changed excludeTests to default to true due to tests not being implemented yet
Removed unnecessary targetFramework property
Removed leftover UWP stuff
* [CsharpNetStandard] More fixes
Added correct dependencies to Readme
Added correct supported frameworks to Readme
Added slightly better placeholder for installation instructions in Readme
Removed leftover dependencies from project.json
Removed leftover SupportsAsync stuff
Removed references to build.bat/-.sh since they're not yet being generated
Todo implement test generation
* [CsharpNetStandard] Added forgoten git_push.sh
* [C#-netstandard] Renamed option to csharp-netstandard
Also added .bat file for test generation
* [C# Net Standard] fixed path in .bat file
* [C# NET Standard] fixes to enum generation
Fixed issues with enum generation due to tired programmer
* [C# NET Standard] Generated sample client library
Sample library generated
Fixes:
Class actually works again
.bat - minor inconsistency fixed
* [C# NET Standard] Error corrected in how timeout is set
Configuration Timeout property changed to TimeSpan type and code corrected around that
* [C#] Merged .NET Standard generator into csharp generator
Functionallity of csharp-netstarndard generator has been moved into standard csharp generator under the targetFramework option as "v5.0"
This was previously missing and I don't think it was intentional.
It appears that swagger-codegen is already correctly processing
the yaml and the placeholder in the template was the only thing
missing.
* Swift3 enum: number variable names fix
Swift3 generator: added 'number' prefix to enum variable names that start with a number
* Fixed Swift3 enum variable names starting with number (prefixed with '_') and added test cases
* Swift3 enum var names: made sure to keep the next word after a number in lower case
* Update samples for nodejs + nodejs-google-cloud-functions.
* Fix example generator to use deterministic randomness.
This avoids changing results after each generation, and makes diff reviews easier.
* Update NodeJS samples.
This is the last "randomness" update. From now on the samples should only change if either the generator, the input or parameters change.
* Fix (partially) #4898 for groovy.
This also adds some TODOs for the missing path, form and body parameters.
* Update Groovy samples (after partial fix for #4898)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
Render "default" instead of 0 for response code when Swagger uses "default" (#4982)
Add title for models to TOC and each model's section
Render model description only conditionally.
Remove extraneous Up link
Regenerate samples/html/index.html
* Make java spring controller constructor public.
This lets users manually create the controller and inject the delegate in the
spring configuration file, instead of letting spring scan for controllers and
autowire the delegate.
* Ran spring-all-pestore.sh.
This adds a `saveCookies` boolean flag to ApiClient. If set to true,
the client will save and return cookies to the server.
This is useful for supporting @SessionScoped beans in Java servers.
Works both in Node.js desktop apps, and in the browser.
* Triple quote python strings in defaults
When the model contains a string with a default value with new lines in
it, simply quoting generates invalid python code. Using triple quotes
for all string defaults makes sure the generated code will be a valid
python string.
Fixes#4862
* Wrap default string in triple quotes when it contains new lines
* Add newly generated python sample files
* Port the optional/enum template logic from async-scala to the regular scala client
* oops, accidently pulled template from akka-scala which has custom logic for enum
Just going to avoid enum for now, considering I'm not sure what scala client
will be official
* Update tests to use option
according to the help message setting dateLibrary to 'legacy' should
make the code generator use java.util.Date.
before this change, when setting dateLibrary to 'legacy' made the
generator use javax.xml.datatype.XMLGregorianCalendar.
now, the generator uses java.util.Date such that the documentation and
behavior are consistent.
* Update samples for Scalatra after 2.2.2.
* [scalatra] Revert changes to build.sbt
Changes were made in conjunction with the new finch generator. This
reverts those changes to Scalatra's previous build.sbt.
* Update scalatra samples again after revert of part of #3905.
* Improved ExampleGenerator:
- Now takes into account enum and uri/url formats for strings.
- Uses example for referenced objects if available.
- Proper examples get generated for specific numeric formats, because more specific formats now get checked before generic format.
- Honors min and max values for numerical properties, if set.
* Ran script `bin/nodejs-petstore-server.sh`.
* Renamed log to logger to conform to coding standard.
Superagent doesn't encode form parameters properly. For example it doesn't encode objects which contain array. The following is a failed test case:
var my_opts = {
'storyId': 65441,
'id': [56, 352]
};
* Update spring samples with current code.
This is done so I can see my own changes better.
* Regenerate samples after 2.2.2.
* use baseName instead of paramName for spring annotations.
* update spring petstore samples to show the effects.
While creating a static library from the generated files, compilation issues arose due to QDateTime only being forward declared. Adding the include resolves the issue.
* add boolean datatype flags to CodegenResponse and logic to set them in DefaultCodegen
* use Boolean.TRUE.equals to check for isResponseBinary or isResponseFile
CodegenOperation and CodegenProperty classes have boolean fields instead of Boolean.
This fix changes Boolean fields of CodegenParameter and CodegenResponse to boolean as well.
Boolean fields are not necessary. Other classes interacting with them have to check for null
before interacting with them which is unnecessary and leads to ugly code.
* Removed trailing spaces
* Fixed autocomplete support for bash-completion < 1.4
* Added mime type autocomplete for Zsh
* Fixed Bash url autocompletion
* Fixed Zsh space after operation arguments and added trim to descriptions
* Added generation of Dockerfile for packaging Bash rest clients
* updated test samples for Bash client generator
Before this change if a model had a property of type=string and
format=uuid, it would be generated as a Java String.
Now, it generates the property as java.util.UUID.
* jaxrs-cxf: Re-added usage of contextPath in api.mustache (basePath)
* jaxrs-cxf: Added useAnnotatedBasePath and generateNonSpringApplication flags
* useAnnotatedBasePath=true uses the @Path annotation in the generated interface to set the basePath, default is false
* generateNonSpringApplication=true generates a web.xml with CXFNonSpringJaxrsServlets. If useAnnotatedBasePath=true only one servlet will be created, otherwise one for each API
* jaxrs-cxf generateNonSpringApplication: removed creation of multiple servlets
Multiple servlets were generated if useAnnotatedBasePath was false.
This is not necessary as there is only ONE basePath per contract
* jaxrs-cxf: added sample generation for useAnnotatedBasePath and generateNonSpringApplication
* Issue #4606 (Spring) SubClass annotations are missing from the base class
* Issue #4606 (Spring) SubClass annotations are missing from the base class
* Commit updated samples from ./bin/spring-all-pestore.sh
This change removes '/' from the set of "safe" characters for the python urllib quote function.
When using PathParams containing a '/' character, the Python client does not encode the '/'. As a result, the / is interpreted as a path separator rather than a parameter value. PathSegments must encode the / character for proper transfer of information. e.g. 'my/string' should be encoded to 'my%2Fstring' for correct transmission of a PathParam argument. Path separators must only be used between path segments.
* Use {{unescapedDescription}} in html, html2
This addresses https://github.com/swagger-api/swagger-codegen/issues/4611
Replace {{description}} with {{unescapedDescription}}
This is an improvement but because of issue #1203 and/or #3436 (fix not
yet impleented), Markdown is not being processed and converted to HTML.
* Add generated petstore samples index.html
* Copy unescapedDescription
Outputs warnings about ASP.NET Core's src/ requirement, and adjusts
sourceFolder if the input doesn't start with src/.
As a consequence of this change, apiFileFolder and modelFileFolder may
possibly return different values if users are setting both sourceFolder
and packageName. This could be considered a breaking change in those
sceanrios.
* issue 3914, removed logic that remove header parameters. update template files to handle header parameters in the same manner as other parameters
* update swift and swift3 samples
* Fixed issue #4665 [go] required object parameters are marked omitempty.
* Run ./bin/go-petstore.sh as suggested by @wing328.
Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
* [JAXRS-CXF] [issue #4386] add builder-style methods to model classes
before this change, model classes had only a default constructor and
setter methods, resulting in code like this:
myModel = MyModel();
myModel.setFirstField(firstField);
myModel.setSecondField(secondField);
return myModel;
this change adds builder style methods, such that the above code can be
written more compactly:
return MyModel().firstField(firstField).secondField(secondField);
this is consistent with other JAVA generators in swagger-codegen.
* update jaxrs-cxf sample code
* Add elixir client
* Add test for elixir client
* Add shell script for generating sample codes for elixir client
It just copied from bin/bash-petstore.sh
* Make elixir-petstore.sh to generate sample codes for elixir client
* Add sample codes for elixir client
error TS2454: Variable 'contentTypeHeader' is used before being assigned.
error TS2345: Argument of type 'FetchAPI | undefined' is not assignable to parameter of type 'FetchAPI'.
* Feature/objc tasks 2.3.0 (#3522)
* change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber
* define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option
* integrate a workaround for a current JSONModel concurrency bug
* update to new ISO8601 pod
* add missing call to super
* integrate new templates into codegen
* updates documentation templates
* updates petstore objc generated code
* fixes objc client tests
* [ObjC] Add version define and share default headers of each client
* add finch generator and resource
* update license, add errros
* Fix problem with multitheard api client
* fix some errors for finch
* [finch] Remove license header
* [finch] Remove finatra stuff, fix a few issues
* WIP: Finch server generator
* [finch] WIP: server generator impl
This puts parameters (input/output) in the right format. Currently, this
is done in the generator class using vendorExtensions, but should be
refactored to imported templates to clean up.
Previous commits of the server generator output to appropriate
models/api directories. I've made no changes to this logic, but code
currently generates to the root scala package directory. This will need
to be fixed.
There's also an issue with circe's and Option[Date] in the Order type.
This issue will need to be resolved. As well, there's some unused
imports to clean up.
Initial implementation lacks support for custom imports, type mappings,
etc.
* [finch] Update api/model package and imports
* [finch] Explicit import/type mappings
* [finch] Regenerate example
* [Python] Improve model equality implementation
The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.
This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.
* Remove wrong auto-update of Python requirements
* two fixes: 1) extra ?'s at end of some url's 2) enums not being called out w/ rawValue to get the proper string name
* update samples
* one step closer
* closer implementation
Fix#4538: Ensure that generated API and Model classes are available to the
autoloader. Change generator behavior to match documentation for
invokerPackage, which reads "The main namespace to use for all classes."
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
* issues 4554: Handle 204 response and handle deserialize exceptions
* issue-4554: generate javascript client updated template
Used petstore-with-fake-endpoints-models-for-testing.yaml
* use petstore-with-fake-endpoints-models-for-testing.yaml like sh script
* fix camelized name with suffix/prefix in java client
* fix php model name with prefix, suffix
* fix indentation in ts abstrat generator
* replace tab with spaces in ts abstract generator
* [java] Attach Javadoc to artifact generation.
* [java] Attach source to artifact generation.
* [java] Add gpg signing to artifact publishing.
* [java] Add artifact URL to pom.xml .
* [java] Add artifact description to pom.xml .
* [java] Add artifact URL and description params to Jax RSS.
* [java] Add developer info to pom.xml .
* [java] Parameterise SCM info in generated pom.xml .
* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.
* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.
* update java petstore smaples
* camelize tag name, remove invalid file
* add back missing files for okhttp-gson
* fix docstring in java feign client
* fix docstring with various java api clients
* Added option to allow unicode identifiers in class names, method names etc.
Added option to allow keeping of underscore characters in class names, methods names, etc.
Unicode identifiers are supported by some languages, like Java, but the codegen will remove all non ASCII letters by default. Users might want to separate different parts of names using extended punctuation connector characters, like "_, ‿, ⁀, ⁔, ・, ︳, ︴, ﹍, ﹎, ﹏, _, ・".
Underscores cannot be used to separate different parts of the name as they're removed by default by the codegen, the second option allows underscore characters if the user so desires.
Both options can be used separately if needed, for example one might allow extended punctuation connector characters, but still disallow underscore.
* Added new command line options to all required unit tests.
* Added KEEP_UNDERSCORES and ALLOW_UNICODE_IDENTIFIERS to Bash tests.
* When KEEP_UNDERSCORES is set don't camelize the names, keep the identifier case as is (you probably don't want camel case + snake case, just snake case when KEEP_UNDERSCORES is set).
Added unit tests to verify how the case is computed for various scenarios.
* Reworked pull request to only include changes related to supporting unicode characters in identifiers (removed references to keep underscores).
* These methods and classes can be static again.
* [maven-plugin] allow for ignore file override
The .swagger-codegen-ignore file is beneficial for existing source
directories to provide pattern-based exclusion rules for existing source
to be ignored by swagger codegen. Until now, there's been no utility
other than skipOverwrite to modify the initial generation of code
(either via CLI or maven plugin).
This commit adds support for an ignoreFileOverride option to both the
CLI and the maven plugin.
Example CLI usage:
```
java -jar swagger-codegen.jar generate \
-i swagger.json -l csharp \
-o target --ignore-file-override /path/to/ignore-file
```
Example Maven Plugin configuration:
```
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/swagger.yaml</inputSpec>
<language>csharp</language>
<invokerPackage>io.swagger</invokerPackage>
<modelPackage>io.swagger.models</modelPackage>
<apiPackage>io.swagger.apis</apiPackage>
<ignoreFileOverride>/Users/jim/projects/swagger-codegen/.sample-ignore</ignoreFileOverride>
<configOptions>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
* [maven-plugin] update new javadocs
* fix bad merge due to missing }
* [aspnetcore] Use default rather than null in ctor
See original issue #3608
This adds same model constructor logic to aspnetcore as what was added
to csharp generator by PR #4145.
This doesn't include NancyFX because model construction relies more on
object initialization in that generator.
* [aspnetcore] ctor defaults + enum support
This follows up to #4145, and modifies model constructors to use
default(x) instead of initializing to nulls. default(x) works in all
cases using intuitive default values it is intended to support.
Example:
csharp> public enum Color { RED = -1, BLUE = 0, GREEN }
csharp> var color = default(Color)
csharp> color
BLUE
In the above example, The default of BLUE=0 is expected. For nullable
enums, this would be null as a default.
The aspnetcore generated code is also updated to support enums and
nested enums to account for changed to the petstore.yaml used to
generate the sample.
* [aspnetcore] Regenerate sample
Earlier CodegenProperty did not have title field.
'title' information of the property was lost while converting from Property to CodegenProperty.
This change fixes it.
* fixes#4432 Adding support for the modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.
* #4432 Running the Petstore files
Allows users to specify 'nonPublicApi' additional property (and C#
client CLI switch) to reduce visibility of classes created by the
generator. This includes API and Models as well as supporting code like
ApiClient and other infrastructure.
The requirement is to support codegen generated code to be embedded
within other applications where the generated code is not intended to be
publicly consumable or publicy exposed. An example would be an SDK which
internally consumes an API via the generated code; we wouldn't want the
internal API implementation exposed as part of that SDK.
Reducing visibility of the classes effectively makes the entire
implementation internal, regardless of the public modifier on methods or
static members. To fully make all members internal it would require
explicit interface implementation, which is not ideal.
see #4401
After merging the fix with another C# change, noticed case sensitivity
issue for the true/false checks. Also noticed my original implementation
wasn't setting the default I- prefix as intended. This commit resolves
those three issues.
Per #4486, this allows user to specify the use of a standard or custom
prefix for interfaces. For C# based languages, this follows Microsoft's
Framework Design Guidelines and uses an I- prefix. However, to avoid
breaking changes with existing nancyfx generated code, the default is
unset.
The option supports true, false, or a custom prefix.
* ISSUE-4531
Arrays are now serialized according to the different collection formats. All api classes are also exported in a const array to make handling of large api libraries easier.
* Added petstore samples
* Fixed indentations and coding style
This covers the usages that weren't fixed in #3825
Triple mustache is required because annotations may contain chars like
"=" that would be mistakenly encoded.
* Remove unnecessary call to setHost() in the constructor
The default host will be automatically set on the client by the ApiClient constructor.
* Updated PHP API Classes corresponding to template updates in #4525.
* Additional changes generated by the petstore update unrelated to #4525, but seem to have not been included yet.
* Add test to prevent regressions of #4525
* Overriden objectmapper wasn't used in deserialisation
Use previously provided apiInvoker instead of creating a instance at deserialision stage
* update scala sample
* add script to detect carriage return
* add check for generator as well
* add fail fast to travis config
* remove tab
* move scripts under bin/utils
* remove carriage return
* move scripts to bin/utils
* Fixes for issue 4226. Detects and warns about more than one inline object; sets discriminator on CodegenModel; Adds templates to other Java languages
Changes to be committed:
modified: modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
new file: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
new file: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
new file: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
* Add vendor extension for x-discriminator-value
Changes to be committed:
modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
* Add "visible = true" to @JsonTypeInfo jackson annotations for Java languages
Changes to be committed:
modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
modified: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
* Fix Gson parsing of Joda DateTime without millis
The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only
parses dates with millisecond values, and throws
IllegalArgumentException when milliseconds are not present. The
date-time construct from RFC 3339 Section 5.6 referenced by the
Swagger/OpenAPI spec allows fractional second values to be omitted.
This results in valid date-time values being rejected by the generated
code.
This commit fixes the problem by using .dateOptionalTimeParser() for
parsing, which correctly handles date-time values without fractional
seconds. A previous version of this commit used .dateTimeParser(),
which accepted a time without a date and was considered too liberal.
Note that .dateTime() must still be used for printing, which is not
supported by .dateTimeParser().
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* Fix akka-scala date-time parser with Joda
As in the previous commit, which fixed Java generators,
ISOISODateTimeFormat.dateOptionalTimeParser() should be used for
date-time parsing and ISOISODateTimeFormat.dateTime() for printing.
Apply the same change to akka-scala.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier. As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement. In this case, "empty" for the empty string/empty value.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* updated to release versions
* fixed defaultValue objects to strings
* added top-level jackson version
* added missing dependency, removed from swagger-core
* Another approach: extending NodeJS server to support GCF.
This does not add a new language, but adding some client options
to support Google Cloud Functions (GCF).
* Add URLs for how to deploy the generated code.
Adds the client options help message and the README.md file.
* check if property is a BaseIntegerProperty. This can occur when format is not specified in Swagger definition
* Change coding style to be more consistent
* Objective C: Fix compilation warnings
If returnType is not provided, set the @return as void
* Run the `./bin/objc-petstore.sh`
* OBJECTIVE C SDK: Remove the return line for methods that return nothing all together
* obj-c sdk: Updated petstore sample
* [html2] Clean up namespace issues in code samples
* pull c# and php package namespace from --additional-properties arg
phpInvokerPackage arg now sets the PHP namespace and packageName sets
the CSharp namespace. invokerPackage still works for Java and Android
namespace.
CodegenResponse's isListContainer property is always false for "array" types. Don't know where the check for "list" comes from but in CodegenOperation, there's a check for "list" and "array".
No mustache file makes use of isListContainer inside responses yet, so should not change any existing behavior.
* Change the value types in additionalProperties and dynamicProperties to Object instead of String.
Change methods that insert values to these maps to use Object as the type of the value instead of String.
* Fix run-all-petstore run: use toString instead of casting
* implemented core integration with play 2.4 ws
* added shell script to test on CI
* added shell script to composite file for all java generators
* added some comments
changed promise param to Response<T> to allow access to http status code and raw response if needed
* removed unnecessary whitespace changes
* added java7 compatibility, play ws deps to pom.xml
* added generated play24 client
* fixed imports
* [JaxRS-CXF][bug #4330] support containers in return types
before this commit if a method returned a container (List or Map) of
THING (i.e. List<THING> or Map<String, THING>) the generated return type would
drop the container and only leave THING.
this commit fixes this issue such that the container type is properly
generated.
* regenerate jaxrs-cxf petstore sample
* allow function so access token can be derived for each api call
* update tests
* update type for accessToken to be string or function that returns string
* fix syntax error
* better code format for android volley
* better code format for apiinvoker, add docstring
* use 2-space indentation for pair class
* use 2 spaces indentation for other classes in android
* allow function so access token can be derived for each api call
* update tests
* update type for accessToken to be string or function that returns string
com.my.Generator.class.toString() returns "class com.my.Generator", and this value is then used in the javax.annotation.Generated annotation like that: @Generated(value = "class com.my.Generator").
Should use Generator.class.getName() instead, so we end up with @Generated(value = "com.my.Generator")
There is no good reason to use Boolean instead of boolean.
Using Boolean will lead to handling "null" state which is confusing.
This change removes changes the type of Boolean properties to boolean.
* Fix for #4322
Signed-off-by: Sebastian Haas <sebastian@haas.tech>
* Run typescript-angular2-petstore.sh
Signed-off-by: Sebastian Haas <sebastian@haas.tech>
* Run typescript-angular2-petstore.sh
Signed-off-by: Sebastian Haas <sebastian@haas.tech>
Put query parameters between quotes and access object keys using square
brackets to make sure special characters are handled in parameter
names.
Closes#4284
* Added support for string responses
When a method/URL/response is defined to return string:
- If no content types are define, default to 'text/plain' instead of
'application/json'
- Add response handler, that returns the reponse string as-is if response
content-type is 'text/plain'
* Removed use of unused tag vendor tag
- The tag was vendorExtensions.x-codegen-response.isPrimitiveType
* Fix support for 'class' properties in Java codegen
Currently Java codegen works successfully for property named 'class' but
fails on '_class', '__class', etc, because of 'Object.getClass()'
overloading.
This fix is intended to avoid all Object method overloading cases.
* Regenerated samples for Java petstore-security-test
* Add two override points inside AlamofireRequestBuilder in the Swift 3 template.
These allow the caller to control the request configuration (e.g.
to override the cache policy) and to control the Content-Type that is
given to an uploaded form part.
* Regenerate with ./bin/swift3-petstore-all.sh to match recent changes.
This includes a few minor changes that weren't made in this branch, so this
apparently wasn't run on master after some other recent changes.