* WIP: CodegenProperty with XML
* WIP: CodegenModel XML bits
* WIP: Jackson XML
* WIP: Java templating
* WIP: Java client withXml flag
* WIP: resttemplate work
* WIP: withXml only when Jackson is used
* WIP: Tabs to spaces
* WIP: java-petstore-resttemplate-withxml sample
* WIP: language: spring
* WIP: language "spring" using library "spring-boot" should include apiPackage in @ComponentScan to detect the API
* WIP: javax.xml for non-Jackson Java and enabled payload logging for jersey2
* WIP: updated java petstore samples
* WIP: JavaSpring with non-jackson XML
* WIP: bin/spring-all-pestore.sh
* Add a swift4 client generator
* Updates per review comments:
- Changed Alamofire dependency from 4.0 to 4.5
- Added "Codable", "Encodable", and "Decodable" to list of reserved words in generator
- Ran "pod update" in default, promisekit, and rxswift samples test projects
Adding the possibility to generate java Vert.X servers.
It uses Vertx-Swagger-Router project.
It can generate an Async callback version or a Rx version.
* Adds Valid annotation for request body (#4847)
If useBeanValidation is active, this change will add Valid annotation to ReqeustBody
* Adds generated samples for bean vaildation in spring boot (#4847)
* Adds feature option (#3819)
When you enable the feature useOptional the JavaSpring generator will use type Optional for non required parameters.
* Adds generated sample for #3819
* Adds generated sample for #3819
* Reverts commit for bean validation
* Adds generated sample for #3819
* Reverts commit for bean validation
* Fix alignment
* update spring samples
* update pom.xml to include spring use optional samples
* update artifactId to "spring-boot-beanvalidation"
* rpelace tab with 4-space
* check mvn task result
* - Added Restbed Generator
* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template
* Changed it to respect alphabetical order
* Made the string joining java 7 compatible
* Added samples
* Auto stash before merge of "master" and "origin/master"
* added missing apache2 config gen in services file
* - Added new Config Type
- Added Samples
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen
* - Added Samples
- Added new config type
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen
* updated versions
* match fix in 2.2.x branch
* updated with 73df07d64c
* regenerate pom.xml for jaxrs-cxf-petstore-server-annotated-base-path
* regenerate pom.xml for jaxrs-cxf-petstore-server-non-spring-application
* fix JS shell script, add log to show es version
* change CLI option default value for useES6
* fix shell script in JS ES6 promise
* fix windows batch files
* set useES6 to false
* add powershell generator (wip)
* minor fix to api template
* rename model files
* Powershell generator fix (#11)
* Fix typo
pacakge -> package
* Add missing `petstore` subfolder to $ClientPath
* Resolve $ClientPath to absolute path
Start-Process needs WorkingDirectory to be absolute
* Fix spaces in variable name
${ somevar } is a vairable that literally has spaces in name. We need to
temporarily redifine mustache delimiters so we can generate var. names
without spaces.
* Fix typo
Remove stray `r`
* Fix *.ps1 import in module
Directory structure has changed + we should export functions using
manifest.
* Remove erroneous file
* various fixes and enhancements
* remove nullable for string
* change function name based on feedback by beatcracker
* set index to start at 0
* fix file type
* Powershell generator fix 1 (#12)
* Add closing curly brace
* Fix duplicated '['
* Get FunctionsToExport using AST
Discussion: swagger-api/swagger-codegen#5789
* add guid option to powershell generator
* add test files, remove docs
* fix array of items
* clean up powershell comment, update model/api test files
* Issue #5147: allow empty values for properties.
* Issue #5147: Allow multiple `-D` options.
* Issue #5147: take advantage (and demonstrate) the new usage of -D.
* Issue #5147: also update windows script and security ones.
* - Added Restbed Generator
* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template
* Changed it to respect alphabetical order
* Made the string joining java 7 compatible
* Added samples
* [kotlin] array->List instead of Array
Serialization to/from primitive arrays can cause issues with valid
responses. This commit considers swagger 'array' types as 'List' which,
although not as memory efficient should provide a cleaner interface for
users (and avoid serialization issues).
Also, updates README.md to list new generator and excludes
folder at samples/client/kotlin/bin/, which is not used.
* [kotlin] Move sample under conventional directory
samples/client/kotlin/ -> samples/client/petstore/kotlin/
Updated new.sh to generate client/server/docs into similar structure.
Current documentation generators (cwiki, html, html.md, html2) aren't
following a convention like client/server generators.
This commit adds Api/Model/Auth documentation to the generated
README.md. Because auth support is not yet fully implemented (users can
manually set default headers globally), there aren't examples for helper
auth methods.
Models with inline enums document allowed values rather than pointing to
a generated enum class.
Two global additionalProperties were added (generateApiDocs,
generateModelDocs) to allow templates to conditionally display
documentatoin depending on these mutually exclusive settings. All
current generators supporting docs will attempt to link to generated
models when only api docs are specified.
This also moves the $@ bash parameter in bin/kotlin-client-petstore.sh
to the end of the args variable. This is because $@ can only be used to
pass System properties like -DdebugModels, can can already be passed as:
JAVA_OPTS="$JAVA_OPTS -DdebugModels" ./bin/kotlin-client-petstore.sh
By moving the $@ to the end of the args, it allows us to pass additional
properties and other switches directly to the script.
* gh-4044: Added useES6 as an option for javascript templates
* gh-4044: Enabled ES6 in `javascript/api.mustache`
* gh-4044: Enabled ES6 in `javascript/ApiClient.mustache`
* gh-4044: Enabled ES6 in `javascript/enumClass.mustache`
* gh-4044: Added useES6 cli option to `javascript` clients and updated the test cases
* gh-4044: Enabled ES6 in `javascript/index.mustache`
* gh-4044: Enabled ES6 in `javascript` model templates
* `javascript/model.mustache`
* `javascript/partial_model_generic.mustache`
* `javascript/partial_model_enum_class.mustache`
* `javascript/partial_model_inner_enum.mustache`
* gh-4044: Separated `javascript-es6` templates to another folder
* gh-4044: Updated `javascript-es6/index.mustache`
* gh-4044: Enabled ES6 in `javascript-es6/api_doc.mustache`
* gh-4044: Added required dependencies for ES6
* gh-4044: Updated Supportig files for ES6 and non ES6
* gh-4044: Added test scripts to verify `javascript` useEs6 option
* gh-4044: Commented `javascript-es6` scripts due to the permission issues.
* Implement generating interfaces option for api resources, closesswagger-api/swagger-codegen#5453.
This commit introduces another _system property_ for typescript-angular2, called `withInterfaces` that is default to `false`. You can activate this flag by:
```
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i http://petstore.swagger.io/v2/swagger.json \
-l typescript-angular2 -o samples/server/petstore/springboot/typescript-angular2 \
-D withInterfaces=true
```
If set to `true`, generated api resource classes will be implemented with their interfaces in separate files.
This change should not break and change the behaviour even though `withInterfaces` flag set to `true`. You are also welcome to create your own custom resource class by implementing those generated interfaces as they support defining new attributes with `[others: string]: any;` signature.
* Fix unit test for typescript/angular2 client options for "withInterfaces"
* Use double quote to follow coding standard
* Respect interface naming convention for typescript/angular2
Create respectful interface names that ends with `Interface` suffix, instead of prefixing with `I` according to typescript naming convention. This is also consistent with their file names that also ends with `Interface.ts`.
Also fixes the merge conflicts.
* Have better explanation for the `withInterfaces` system config
- typo in csharp-petstore-net-standard.sh (Stanard -> Standard)
- non-existent config file name name in csharp-petstore-netcore-project.sh
- non-existing config file name in ruby-petstore.sh
- snapshot versioning in typesript-petstore-npm.json causes
non-deterministic output
* remove trailing space in cpprest, update samples
* add android batch files, better code format, sync petstore.json with
petstore.yaml
* restore petstore.json and sync it to petstore.yaml
* update circleci pom.xml
* add new android files
* add new android files
The old android-petstore.sh script is writing output to the android volley
directory. There is a new script called android-petstore-volley.sh that also
writes to that same directory. They overwrite each other, which makes the
run-all-petstore script output dependent on which one gets run last. This change
removes the old script.
* Add support to UUID type
* Simplify and use a simple QString instead of a QUuid.
Work for using a QUuid is way larger than supporting QString (imply modifying multiple c++ templates).
Current needs are fullfill with the use of a simple QString, so I let the use of QUuid for future enhancement.
* - add windows executable for generating qt5 security samples
- update sample clients
PS : some modifications on the samples are not related to the patch I applied. Were the samples up-to-date ?
* Add support for Spring's RestTemplate in Java client codegen
Resolves#1176
* Update all Java samples to include change for Jackson enums
Currently enums are deserialized from a String value with an
explicit @JsonCreator. However, they are not being serialized with
this String value. This change introduces the @JsonValue annotation
on the toString() method of enums, so they will be serialized as a
String with the correct value.
* Rewrite of Go Client
* Revert to older version of context.Context
* Clean and bulk up concurrency test.
* Correct {{path}} to {{{path}}}
* change custom date type to string.
* Add APIKey authentication
* Correct missing line from resolving conflicts.
Correct missing line from resolving conflicts.
* Adds Valid annotation for request body (#4847)
If useBeanValidation is active, this change will add Valid annotation to ReqeustBody
* Adds generated samples for bean vaildation in spring boot (#4847)
* Adds Valid import to Controller
* Adds generated code for bean validation change
This is for the EAP version specifically.
* The JacksonConfig class always used the io.swagger.api package
* The RestApplication class did not import the service implementations
from the correct package
* Added shell script for generating test applications
* JaxRS server: set serverPort only when not given from outside.
* Update JaxRS sample creator scripts to fix serverPort.
* Preliminary test fix for JaxRS server generators.
* Updating samples for JaxRS with Jersey1/2.
* Issue #3084: add hideGenerationTimestamp option to Go server generator.
* Issue #3084: use hideGenerationTimestamp in go server sample script.
* Update Go server samples.
* 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
* [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"
* 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
* 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
* 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
* 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
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.
* 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
* 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.
* 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
* [feign] add threetenbp support for feign clients
* [okhttp] add threetenbp support for okhttp clients
* [jersey] add threetenbp support for jersey clients
* [retrofit2] add threetenbp support for retrofit2 clients
* [spring] add threetenbp support for spring generators
* add a workaround in tests for a bug in the petstore
The petstore doesn't manage fractional digits of dates correctly when there are less than 3
* add configuration to typescript fetch
* fix issues reported by the CI
* fix header parameters in ts fetch client
* add new configuration file for ts fetch
* skip if check for configuration in ts fetch
* Fix `this.configuration` issue in paramsCreator
* update ts fetch samples
* Fix typescript fetch tests to work with Configuration
* Add dictionary to store apikeys (#8)
* Add dictionary to store apikeys
* Type apikey with expected params rather than Dictionary - typescript-fetch
* Update test samples to new typescript-fetch api
* Fix tests for typesript-fetch api
* update typescript sample using petstore.yaml
* added method summary under the method name
* added batch file for html2 generation on windows
* regenerated html2 example
* changed the html2 windows batch to use yaml instead of json and regenerated sample
* fixed encoding issues
This moves previous aspnet5 functionality to aspnetcore, aspnet5 now
derives from the aspnetcore generator and logs a warning that it's
deprecated.
This will help resolve any confusion because ASP.NET 5 is terminology
referring to the project of around a year ago. ASP.NET Core 1.0 is the
new name for the technology, and further enhancements should target .NET
Core 1.0 rather than any old vNext or preview stuff.
* Generate a JAX-RS server that assumes an Apache CXF framework on a Java EE server supporting CDI
* Samples for jaxrs-cxf-cdi
* Don't refer to missing class NotFoundException
* Update samples without missing NotFoundException reference
* fix jaxrs line break
* fix java gradle bat line break
* fix scala gradle line break
* fix undertow crt line break
* fix spring line break
* fix undertow line break in pom
* rollback undertwo petstore to use petstore.yaml
* Amending Path annotation
Changed the Path annotation value from "/" to "/{{baseName}}"
* jaxrs-cxf-petstore-server.sh script was not referencing cxf module directory. Included generated files following script run. Have amended Path annotation value to {{contextPath}} and removed public access modifier from template as this is redundant for Java interface definition.
* use square bucket for C# dictionary
* use packageName for nancyfx generator, update info to debug for log
* use packageName for nancyfx generator, update info to debug for log
* fix: query params may be ints as well
don't assume query params are Strings or List<String>s
* fix dart: use correct type for QueryParams
type is Iterable, not List
only check params for != null if they haven't been checked already
add some casts to make strong mode happy
update petstore
* feat dart: enable strong mode
* feat dart: generate both browser and vm library
move petstore client into subdirectory and reference
generated libraries using path in pubspec.yaml
* feat dart: refactor petstore test.
The new layout resembles a real project.
petstore test is now strong mode compatible.
* feat: add DateTimerParser transformer
* feat: improved exception reporting
* feat[dart]: handle patch requests
* fix[dart]: typo
* fix dart: remove findPetsByTag test; enable strong-mode
find pets by tag call is deprecated and returns 500
generated library is now strong mode compatible
* add line break test to petstore-security-test.yaml
* add objc/swift security testing
* add go,scala,qt5cpp for security test
* add security test for typescript
* fix go security issue, fix consumes,produces line break
* add run all petstore shell script
* add run all petstore batch file for windows tests
* better output for travis and appveyor
* add shippable config to test all petstore
* show log after test script
* remo all-petstore, update travis build
* update shiippable config
* add run-all-petstore
* failure test using ruby model
* use bash script for run-all-petstore
* update script permission
* fix html batch script
* fix missing doc in jaxrs spec generator
* fix missing api, model test in jaxrs spec generator
* rename licenseInfo for lumen
* remove ruby model failure (for CI test)
* fix "the input line is too long"
* update windows batch file to shorten the commands
* update appveyor config
* update shippable config
* add build script
* update batch file to remove args option
* fix window batch file for spring mvc/boot
* remove logging output to file
This migrates the server generator for aspnet5 from 1.0.0-rc1-final to
1.0.0.
Changes are fairly significant in how Kestrel hosts the application, as
well as how Swagger finds XML comments for documentation. Changes are
only related to hosting, docker, and configuration.