* Issue #3084: add hideGenerationTimestamp option to Go server generator.
* Issue #3084: use hideGenerationTimestamp in go server sample script.
* Update Go server samples.
* 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
* - Add "wrapCalls" and "useSwaggerUI" CLI Options and updated what handleException does to follow Play Framework lifecycle more closely
- Updated all mustache files accordingly
- Updated the sample
- Updates Play Framework version to the latest 2.5.13
In the convenience class defined for generating a Map of query parameters, the
parameter name was mistakenly being set to the Java variable name, not the
actual parameter name. These are often the same, but can be different in the
case of multi-word parameters, such as in the sample API's `enum_query_string`
vs `enumQueryString`.
* Update samples for java/jersey2-java6.
* Let the sample generation script set the right name for jersey2-java6.
This is the equivalent change to #5095, for jersey2-java6.
* Update samples for Java/Jersey2-java6.
* Sync with upstream/master
* Support Markdown in -l html
Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)
Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml
* Support Markdown in -l html
Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)
Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml
* use builder pattern for operations
* @QueryMap parameter only for query parameters
The previous iteration had replaced all parameters (body, path, query, etc)
within a single @QueryMap. But Feign only supports this style of parameter
passing for query parameters. Besides, for the case of a body parameter (like
soxhlet uses) it only added extra verbosity. With this change, the query
parameters are gathered together in a single @QueryMap and the other parameters
are left alone.
* Adding template for generating test code
* Make javadoc consistent with rest of file's conventions/indents
* Update samples
The files in src/main were generated by running
$ bin/java-petstore-feign.sh
The files in src/test were manually fixed.
* Correct capitalization of @QueryMap class in feign
Adds a field operationIdCamelCase (a la operationIdLowerCase) to the
CodegenOperation container and uses it in the feign-generated classes
with @QueryMap parameters. Also re-generated the feign samples.
* Adding hyphen to javadocs for extra readability.
* Adding (not replacing) api method with @QueryParam overload.
In order to keep backwards compatibility, switched to adding a new method to
the interface instead of replacing the old call.
* Adding newline to generated source for readability.
* 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
* [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.
* 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)
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
* 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.
* 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
* 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
* 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
* 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
* 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
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
* [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
* fixes#4432 Adding support for the modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.
* #4432 Running the Petstore files
* 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