* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.
* Fixed issue #1531. Now in C# operation parameters are post-processed to correctly mark them as enumerations. The api.mustache C# template now marks parameters as nullable when they're non-required enums.
* #1531 Added fix for enum, non-required parameters to the interface of the auto-generated C# Apis.
* Fixed error with the development of ticket #1531, which duplicated nullable question marks for primitive types.
* Add validation of required properties
Add Header extraction for client
* Remove some todos
* Add Test for Store API
Improve some checks for serialization
* Returns status code which defined at Response Object
* Tweak indent
Remove the spacer "{{#async}} ... {{/async}}" "{{^async}} ... {{/async}}"
* Update samples^
* Fix broken indentation
* Update samples
* Revert methodBody.mustache
* Revert "Fix broken indentation"
* This reverts commit 95b6a00f8b1d92a65e0d4467b5c4f034a9579e43.
* Revert "Tweak indent"
* This reverts commit ba2cedc89723ed480e8282c0a4e07ab2d3670262.
* Revert "Returns status code which defined at Response Object"
* This reverts commit f676a89e230dde6741aa96d7b2e27e04b35dbf5a.
* Example contains status code
* Update samples
./bin/spring-all-pestore.sh
* Fix syntax error
* Update samples
* Run bin/utils/ensure-up-to-date
* Make the changes an option `returnSuccessCode`
* Run bin/spring-all-pestore.sh to update samples
* Run ./bin/utils/export_docs_generators.sh
* Fix swagger-api/swagger-codegen/issues/8138 swagger-api/swagger-codegen#8138
When JSON payload needs to be in the body (`"in": "body"`), it must not generate a multi-part body, but embed directly in HTTP body.
* update elixir samples
* update elixir client samples
* remove double quote
* update samples
* remove string boolean map spec
* add logic to skip array alias being generated as model
* fix alias to array
* remove unused ruby files
* remove unused ruby (oas3) files
* unalias response schema
* fix NPE when no model defined
* fix ruby openapi3 script
* update samples
* add global openapi, schemas for unaliasing
* minor code cleanup/refactoring using globalSchemas
* Revert "minor code cleanup/refactoring using globalSchemas"
This reverts commit 20a2bbc6fc4267a0e0768dcf5f15d4194ce9647b.
* 1506 allow zonejs 0.7.x and 0.8.x to support a wider range of angular versions
* #1506 Removed zone.js as peer since it comes with angular itself
* #1506 Removed zone.js as peer since it comes with angular itself
- fix build for example-app + tests-integration in Samples (due to change in Category)
- upgrade stack to 12.18
- fix typename generation bug for array params
* Use appDescription in composer.mustache
* Update petstore files
* More updated php petstore files
* Yet another updated php petstore file
* Use "{{{appDescription}}}" instead of "{{appDescription}}"
* added my fork from https://github.com/Place1/swagger-codegen-typescript-browser
* ran bin/typescript-fetch-petstore-all.sh
* use FormData.append rather than .set for IE11 compat
* reverted change to licenseInfo.mustache
* reverted some comments
* added package.json and tsconfig.json back to the generator
* added support for blob (application/octet-stream) responses
* models and apis are now in folders
* added support for modelPropertyNaming based on the spec
* bug fix
* updated samples
* Restore pom.xml for typescript project
* Restore samples/client/petstore/typescript-fetch/tests/default/package.json
≈
* added support for response type Date conversion
* updated samples
* Rework pom in "samples.ci"
* Restore "samples/client/petstore/typescript-fetch/tests/default"
* updated configuration class to use property getters to allow clients to implement configuration values as getters
* added {{datatype}}ToJSON functions to handle serialization and naming conversions
* fixed missing import
* fixed compilation error. updated samples
* 1 character change to get CI to run again
* updated samples
* added support for array type request body
* updated tests
* support for optional request bodies
* updated models json converters to handle undefined inputs (to simplify usage in optional contexts like optional request bodies)
* updated samples
* updated tests
* changed to typescript version 2.4
* updated samples
* support for optional properties being null, undefined or omitted
* updated samples
* bug fix
* bug fix
* updated samples
* ran npm install in test project
* patch to get tests running
* added support for retrieving raw response. added support for binary request bodies. added support for blob data type for files/binary.
* add c generator (1st commit)
* udpate c model template
* more fixes
* Add string replace function for C generator (#908)
* Add string replace function for C generator
* Fixed replacement for variable only
* Fixed problem for different datatypes of paramName
* store return value of modified path
* set str_replace variable to be same as original variable.
* [C] Fixed coding style issues
* add uncrustify support
* update petstore sampmles
* add Locale.ROOT
* added test-api-client.c to include test cases for strReplace function
* added header and body mustache and made changes to ClibcurlClientCodegen.java accordingly
* [C] renamed functions in apiKey.c.mustache according to apiKey.h.mustache
* [C] changes in import statement
* renamed apiKey.h to keyValuePair.h and made necessary changes in the codes
* changed apiKey.c according to keyValuePair.h
* fixed import statement in model
* added code for generating struct in model-header.mustache
* added typedef struct for model-headers
* updated sample/client/petstore/C
* fix locale
* [C] Function addition and modification of major structs (#1020)
* added readme file
* fixed parameters in api headers functions
* made changes to add readme file and typemapping of array to list
* fixed header import statement in apiheader files
* modified struct of model type in model header
* updated sample
* modified README file
* updated sample
* parse from json function added
* modified struct and create function
* added include for model
* modified parsefromjson function
* modified struct and create function for more datatypes
* added mapping for date-time and modified model import return statement
* modified function parameters
* modified include statement
* fix function in api body
* updated sample
* clean up files
* regenerate c petstore
* fix error message when setting uncrustify
* add version to uncrustify usage
* added uncrustify rules in mustache (#1021)
* added uncrustify rules in mustache
* updated sample
* updated same with crustify
* updated sample with uncrusitfy 0.67
* modified readme about uncrustify requirements
* fixed mistakes in readme mustache and sample readme
* fix file import, unformat c petstore
* fix import in test files
* fix model with complexType
* fix free string, format the code using uncrustify
* modified sample
* Modified sample to check
* return type issue figured,more to do to fix it
* minor fixes to make complete code compile
* Compiling sample code. Store has issue with map.
* comment out test file generation which is not req.
* commented operation name
* fixed various issues responsible for code not compiling
* test mustache temporary for testing
* updated sample add,del,getbyid works, formparam yet to do
* few minor changes and added fuction to add different header and content type in apiClient
* added code to upload image
* added function to test upload image
* fixes for fileupload and various other small things
* fixed issue due to xml produces
* updated sample:working sample add,del,find,uploading:tocheck ,
* added free functions for variable where memory is allocated
* rename imagecontainer struct to filestruct
* fix issues with if functions for all list types
* fixed issue with primitive return type in header file
* updated sample w/ free functions
* update c samples
* remove corrupted file
* update samples
* test cases for APIs
* added function to generate test cases from new mustache
* mustache files for manual written test cases
* added default content type to application/json
* fixed issue with primitive return type
* fixed issue with bool type
* added file apiKey.c
* updated sample tested
* update c environment variable (#1090)
* add mapping for map (#1103)
* minor update
* revert list paramter check to NULL
* modified return type for primitive(map - list_t)in mustache
* removed apiClient_free as it was two times
* updated sample
* fixed issue of path parameter when string less than parameter len
* fixed issue for form paramters upload
* added checks to avoid seg faults
* updated sample
* added check for null value in form parameter
* modified size of mallocs to dynamic
* updated sample
* Add C Petstore to Travis CI (#1136)
* setup CI for C petstore
* update bash script permission
* unit petapi test
* fixed memory leak in strReplace and apiClient Functions
* modified return value for status generation
* added enum defination and functions to convert and back from string
* added function for enum and made changes to free memory at necessary places
* added datatype handling for enum
* fixes regarding memory allocation and free
* updated mustache of test files
* updated sample
* renamed manually written test files
* manual test file for pet
* cleaned common api test file for time being
* renamed test files
* added renamed test files to build test bash
* added file null pointer check
* modified uncrusitfy rules
* minor update to c templates (#1161)
* [C] Fixed enum function declaration (#1178)
* fixed enum function declaration in model headers
* fixed enum declaration in header files for sample
* disable curl verbose mode and add response code variable
* added response code variable in apiClient struct
* modified apiClient header and source file
* added response and removed commented code api-body mustache
* removed commented code from model-body mustache
* removed unnecessary print statements from test mustache
* updated sample
* fixed spaces issue
* Better format in C templates (#1224)
* better format in the c template
* minor format fix
* [C] changed base url from static to dynamic (#1225)
* changed basePath from static to dynamic
* removed unnecessary header declaration
* updated sample
* [C] added curl version check in CMakeList.txt (#1248)
* added curl version check in CMakeList.txt
* Updated README for latest curl version
* [C] Major changes to keyValuePair function (#1282)
* removed static declaration
* changed static declaration
* added difference for string and non string
* added more code for different function for string and non string
* fix issue with param name
* change value in keyPairValue to void
* fixed issue of difference in function name cases
* added support for non char parameters in api
* fix issue of map return data
* modified manual-StoreAPI map return data handling
* fix minor mistake
* added support for map and changed code to support value of keyvaluepair as char and other
* updated sample
* fixed api header declarations
* change map declaration in header
* resolved issues realted to map data handling
* fix minor issues
* add N at start if enum variable starts with number
* override toParamName method
* changed paramters to paramName from baseName
* change variables in apibody from baseName to paramName
* Skip test file generation (#1459)
* skip test file generation
* skip overwriting CMakeLists.txt
Ensure the same date format string is used throughout the generated code (use the one set in Configuration.swift).
Ensure the same date formatter options are used when encoding dates as well as decoding dates. If a consumer has set their own date formatter on CodableHelper, use that when encoding dates too.
Adds DateFormatTests to the SWIFT4 unit tests.
Updates the SWIFT4 petstore samples
- Remove pointer usage in generated models
- Use const reference wherever possible
- Reuse same super class for Qt5 client and server
- Support primitive return types for Qt5 client
- Add const reference to API calls
* Avoid creating unused ThreadPools
Instead, create ApiClient.pool on first request for .pool property.
avoids spawning n-cpus threads (the default for ThreadPool) at instantiation of every ApiClient
* update doc
* set pool_thread to None
I think these tests cover all the problems with rust-server and inline objects I know about. This should show us when we've fixed the problem.
Also fixes a CI failure.
* Added tests and fix for issue #1392. Param validation with regex not recognizing \d correctly in Ruby client.
* Added generated files to pass ./bin/utils/ensure-up-to-date which is run by circleci
Builds on #1180 by @colelawrence. This addition to the rust-server generator enables the use of text/html responses as plaintext.
I've added an html endpoint to the sample to demonstrate that this works (and fixed the problem that that uncovered).
This MR allows package version to be specified in Rust in the generate argument list, with the argument `-DpackageVersion=<package_version>`. If this argument is present then the version in the resulting Cargo.toml file will be the passed value. If this argument is not present then the version in the OpenAPI definition file will be used, as per current behavior.
* feat: OpenApi-generation from within eclipse (#509)
* Added life-cycle-mapping for recognition by M2E
* Make BuildContext injectable by M2E in oder to detect if json-source
has been modified and a regeneration is required.
* core: fix indentation problems, remove commented code
* add group parameter support to php template
* more update for group parameter
* fix call to protect function
* fix missing $
* update based on feedback
* create fake endpoint to test group parameters
* sync fake petstore spec v2, v3
* fix php doc for group parameters
* update petstore samples
* update fake petstore spec v2
* update petstore samples
* fix spec and update samples
* Improve method signatures to use const when the value won't change
* Update PetStore
* Change setters for non-primitive types to receive const reference parameters
* Update PetStore
* Generator erlang-proper
Used to generate PropEr generators for property-based testing
* Fix binary/2 implementation. Add behaviour attribute.
* Remove line from copyright notice
* Avoid escpaing HTML and remove suffix from variable name
* Update samples
* Include querystring parameters
* We use export_all, don't consider warnings as errors
* List command sequence on failure
* Use hasConsumes instead
* Add nowarn_export_all, re-add warning_as_errors
* fix wrong formParams type
* run typescript-angular-petstore-all.bat
* more typesafe fix
* fix formatting
* run typescript-angular-petstore-all.bat
* fix compile problem with previous versions of angular
* generate code
* fix compile problem add <any>
* try Johannes Hoppe solution
* generate files
* handle and return API response decode error
* ensure-up-to-date
* refactor go/api.mustache for easier readability
* disable error reporting for TestPlaceOrder with invalid RFC 3339 `+0000` UTC offset present in Petstore test server
* Port of PR https://github.com/swagger-api/swagger-codegen/pull/8804.
* Correction of conflict with PR #528 (missing template file).
* Add rust-reqwest samples to Circle CI tests.
* Add integration test pom.xml file with launcher to trigger cargo execution.
* Deduplicate Maven project name.
* Fix "api_key" header for Petstore.
* Better API key management.
* Fix query param for lists of objects other than strings (numbers, etc.).
* Update to reqwest 0.9, and refactor of header management (using reqwest transition feature).
* Merge scripts generating rust-hyper and rust-reqwest samples.
* Consistent full stops.
* Use raw variables in all Rust mustache templates.
* Replace production build in CI with a quick simple check.
* Update samples.
* Finish Reqwest 0.9 migration (removing "hyper 0.11" transition feature).
* Configuration implements Default trait.
* API template reorganized: HashMap is not required anymore.
* Revert "Merge scripts generating rust-hyper and rust-reqwest samples."
This reverts commit 970f996566a740045f2a986fd70fc70f11952925.
* Remove deprecated "-XX:MaxPermSize" java arg.
* Implement the ability to read packageName and openAPISpecName from a json file
* Replace '{{openAPISpecName}}' with '{{{openAPISpecName}}}'
* Update erlang-petstore-server
* Add support for using Spring HATEOAS to add links in the spring generator.
* Ensure that Spring HATEOAS links appear last in the JSON serialisation of objects.
* A couple of changes following code review:
1. Make sure the @JsonPropertyOrder annotation is only used when the jackson library is being used since it's a part of the jackson library.
2. Make sure to include the Spring HATEOAS dependency in the pom file for the spring-cloud and spring-mvc generators when the hateoas option is enabled.
* Don't order the json properties since there's no requirement for the links to be last.
* Remove unnecessary import.
* fix InlineModelResolver's logis and use openapi-generator's InlineModelResolver, so that nested "required" works correctly
* add "required" to nested model schema
* update ensure-up-to-date to include openapi v3's jaxrs
* change test required field
* fix sample shell script, hide timestamp
* fix NPE
* move test case to petstore-with-fake-endpoints-models-for-testing.yaml
* fix jaxrs-jersey (oas3) example generate shell script to use petstore-with-fake-endpoints-models-for-testing.yaml
* add default value
* re-generate samples
* typescript-axios: Added possibility to add custom axios instance.
This comes in handy if you want to use mocks in tests.
* typescript-axios: aligned to fetch API for custom instance
* update ruby samples with OAS3 spec
* add server support to ruby api client
* minor format change
* minor format fix, skip form models
* better exception and add test for invaid value
* remove exception test code
* saving the fixes.
Used commons-configuration2 for
org.apache.commons.configuration2.PropertiesConfiguration.
It makes the configuration easier to read amongst other benefits
* removing tabs
* updating and simplifying based on sugegstion from William. This should
now fix across all generators
* upgraded pom
* added some javadocs for the new method
Update to version 2 of the `swagger` crate, which contains changes intended to make it easier to debug errors involving middleware and contexts. Crates making use of the autogenerated libraries to also update their swagger dependency to version 2. See [here](https://github.com/Metaswitch/swagger-rs/blob/2.0.0/CHANGELOG.md) for details.
This updates config-help to have more control over how the output is
written for the user. We dump config-help output for per-generator
documentation, and this cleans up some cross-platform compatibility
issues that might arise from tweaking the output for clarity in the
target file.
Previously, we'd pipe config-help output to sed, then insert the
generator name, which we then redirected to an output file. The sed
syntax had to include a trailing newline so our tabbed configs would
automatically become code tags in markdown. Inserting newlines into sed
replacement strings doesn't work the same across platforms, mostly
because of Apple's customizations to GNU programs.
This commit moves the generator name and newline insertion into the
command itself. It also includes a new --output option, allowing the
user to specify the output location of the config-help.
Currently, we only dump in plain-text, and it is only coincidental that
our plaintext output results in a desirable Markdown output. If
tabbed lines did not automatically convert to a code style block, some
generators like C# would end up with broken text (`List<T>` would become
just `List`, for example).
I had previously discussed extending config-help to output to other
formats like asciidoc. This commit does not introduce any steps toward
that end.
* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.
* Fixed issue #1126. DefaultCodegen now sets the hasChildren property of CodegenModel when children models are added to the model. Changed the modelGeneric.mustache template to decide whether to include a base validation model (for children to inherit) based on the hasChildren property, and not the discriminator property.
* Run the ./bin/utils/ensure-up-to-date script after fixing the issue #1126
* Reverted modification in go samples, performed by ./bin/utils/ensure-up-to-date, that are failing in CI.
This partially reverts commit 2168df0f82d987ff8d50963d34efb269b015ef98.
* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.
* Fixed the #1088 issue by removing the update of enumeration properties while processing objects that reference them. Launched the ./bin/csharp-petstore-all.sh script.
* update jmockit version
* list jvm
* test jdk9 in appveyor
* use latest version of gradle
* update to jdk9
* use openjdk9
* use default java version in appveyor
* use jdk8 docker image
* consolidate bash, ios pom into parent pom
* consolidate circlecii pom into parent pom
* remove circleci pom.xml
* Allow specifying/overriding the parent in the pom file for Java and Spring generators.
* Don't add extra whitespace to the pom file when the parent isn't overridden.
* Remove accidentally added white space.
* Start working on fixing default value in Restbed Server Api Template
* fix default value in DefaultCodegen
* Revert "fix default value in DefaultCodegen"
This reverts commit ce690069d25f79f4308240a611792a0dd87bb172.
* fix default value in cpprest
* update cpp restbed samples
* remove left|right point double angle quotation marks
* move to DefaultCodeGen and update TypeScriptAngularClientCodegen to reflect new clean function so that the filename AND imports are added correctly
* rename to a more accurate name :)
* shippable fixes
* shippable javadoc fix
* replaced cleanModelFilename with sanitzeName
* remove DefaultCodegen changes
* renmae Go post process file env variable
* add back samples/client/petstore/c/libcurl.licence
* keep go samples up-to-date
* update go petstore samples
* update go samples without formatting
* Generate default values for optional model fields in scala-akka
Fix#1118
* Updated akka-client petstore with defaults for optional model fields
* update petstore sample with scalafmt
* Use the same name for all exposed encoder & decoders;
* Improve imports (limit exposures);
* Add support for OAS3 discriminators;
* Distinct between 0.18 & latest mustache files.
* copy from go-server and add go-gin-server generator
* change the templates for the gin
* fix warnings of the golint tool
* fix the path of script
* add samples
* delete unnecessary comments (#1048)
* make the help message more appropriate (#1048)
* fix the link address format (#1048)
* minor improvement
* If required and readonly, a field should be optional. This is to allow people to get and easily put back.
* Use list instead of array, use String instead of kotlin.String etc
* Update samples
* code review: fix annotation formatting
* code review: revert change to use listOf
* [Ada] Operation security scopes are ignored when generating the server (#1043)
- Update fromOperation() to keep the operation required scopes for each auth
method and store that information in the x-scopes vendor extensions attribute
- Update postProcessOperationsWithModels() to process the operation required
scopes and build a list of authMethods which only contain the required scopes
for the operation and store these authMethods in the x-auth-scopes attribute.
- Update postProcessAuthMethod() to handle the logic of filtering and building
the operation authMethod (new instances are created because we must not
modify the global authMethod definitions)
- Update the Ada server templates to use the x-auth-scopes instead of authMethods
Add a URL prefix parameter for the Ada server instantiation
* Fix the Ada server template to use the x-auth-scopes for operation scopes
* Add support for access token retry in okhttp-gson lib
* Update expected number of generated files in test
* Update samples
* Update security samples
* Fix default user-agent and update samples
* allVars is duplicating child preoperties when models are inherited. Filter out these duplicates in the KotlinSpringServerCodegen
* isInherited property was not being populated in the CodegenModel, re-parse the models in the KotlinSpringServerCodegen class and populate the property here
* Add template support for Kotlin models which require inheritance from a base class to support oneOf declarations in the api yaml
* Change optional for parameters to use Kotlins nullable
* Update petstore api with Optional -> Nullable
* feature: add generator for typescript/axios
* feature: add sample scripts and sample code
* fix: set request body in data property
* feature: add samples and tests for typescript axios client
* test: add tests for typescript axios client
* fix template to add @Valid to POJO fields regarding nest, in java-jersey
* regenerate with for scr in `ls ./bin/*jersey*.sh`; do sh $scr; done
* re-generate with ./bin/openapi3/jaxrs-jersey-petstore.sh
* update api template for jersey1
* re-generate samples
* re-generate samples
* Support Gradle 4.10
Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the `tasks` registration used in
this plugin.
Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.
As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.
* Uncomment snapshots repo (commented it during local testing)
* update pom.xml for exec gradle plugin
* Update the .net core sdk to v2.1 and update the asp.net packages used.
* Upgrade the SwashBuckle Asp.Net Core package to v3.0.0.
* Update the AppSettings json file and add a file used in development.
Also, remove the web.config file.
* Update the program template to use the web host builder class.
* Update the startup class to use the Asp.Net 2.1 paradigms.
* Update the launch settings json file.
* Update the controller template to derive from the ControllerBase class as aposed to Controller.
* Add the SwashBuckle annotations package.
* Add the SwashBuckle.AspNetCore.Annotations namespace to the controller template.
* Update the Startup template to add comments to the Configuration property and an env parameter to the Configure method.
* Update the startup class so we don't need to inject the hosting environment.
* Update the program class to have hte recommended CreateWebHostBuilder method from asp.net core 2.1.
* Update the asp.net core pet store sample server.
* add back aspnetcore 2.0 template via option
* remove web.config for aspnet core 2.1
Support basic query handling
Add helpers for primitive de-serialization
Remove warnings due to unneeded commas
Deserialize basic types in queries
Add dependencies chain for external libraries
Fixes wrong parameter passed to API
This fixes an issue that makes the swift 4 api client fail to compile when using enums with a default value.
The fix changes the toDefaultValue method to check if the property is of enum type, and then returns a properly formatted value.
Looking into the code, I wonder why toEnumDefaultValue is not being used here, which seems to be the case for the java implementation.
* fix circular import issue in python flask
This is very similar change to 3678eaff87dd95348470c
All it intends to do is fix the problem of cirular imports (which was
already fixed for python) in the python flask server.
* removal of type hints in quotes