* Fix escaped regex values in Python client (#1517).
* Override PythonClientCodegen toRegularExpression() method to correct
issue with backslashes being escaped. This issue was a result of
calling escapeText() in the parent DefaultCodegen class.
* Only escape unescaped forward slashes in PythonClientCodegen.
* Override addRegularExpressionDelimiter in PythonClientCodegen.java
such that only unescaped forward slashes in the pattern get escaped.
* Adds a new test resource .yaml file for specifically testing this
issue.
* Check for regular expression modifiers in PythonClientCodegen.
* Adds check in postProcessPattern() in PythonClientCodegen.java to
check if regular expression has modifiers defined. If so, it throws an
exception as modifiers are not currently supported in the Python
client.
* PythonClientCodegen warns that regex modifiers are not supported.
* Changes behavior in PythonClientCodegen.java to no longer throw an
IllegalArgumentException in the case that a pattern contains
modifiers. A warning message will be logged instead stating that
modifiers are not currently supported by the codegen class.
* Remove warning for PythonClientCodegen regex modifier support.
* Removes warning message from PythonClientCodegen.java stating that
regular expression modifiers are not currently supported. Further
code review and testing revealed that this feature is already
supported and working.
* Add updated Python client sample files.
Fixes#1696
An object schema containing no properties that also has additionalProperties
set to an object schema with no properties will cause
ModelUtils.isFreeFormObject to throw an NPE.
This PR adds additional checking to avoid the NPE.
* [Typescript][Fetch] Always initialize queryParameters
* [Typescript][Fetch] Resolve date and date-time formats to parameter type Date
* [Typescript][Fetch] Update models template
- Add `readonly` modifier to readOnly parameters.
- Omit readOnly parameters from requests when serializing models
- Use allVars in models template when serializing/deserializing requests
* [Typescript][Fetch] Omit time component when parameter format: date
* [Typescript][Fetch] Add moduleResolution: node option to tsconfig.json
* [Typescript][Fetch] Added non-model enums
* change folder structure for external and added list as primitive type
* modified gitignore for C generator
* change include statement as per directory structure
* added projectname variable for using in cmakelists
* modified cmakefile:compile files irrespective of testfiles and add support for make install
* updated readme with how to compile and how to use
* CMakeLists change curl to 7.58.0
* fix indentation
* add remove as reserved word
* Add GraphQL express/apollo server generator
* add basic resolvers; adjust parameters/input types
* small adjustments and improvements
* adjust logger config for GraphQL generators
* remove MaxPermSize form bash script as it will be removed from later Java versions; add isNullable utility helper method; Adjust TODOs for graphql implementation
* re-created samples for graphql config and server generators
* re-added templates for graphql config generator
* add graphql-config-petstore bash script
* add isNullable utility method
* fix javadoc issues
* adjust licence headers
* rename Generator to Codegen for GraphQL classes
* renaming, minor enhancement to graphql generator
* add graphql server samples
* add windows batch files, rename directory
* Ensure that generic JSON bodies are correctly autogenerated
Generates valid Rust for an arbitrary JSON response body of type `object` with no other schema.
* [Haskell Servant] Upgrade to lts-12
- Upgrade Servant to the latest version
- Add Maybe for optional values
- Add UUID, UTCTime and Day types
- Fix the URL configuration so that it has one param with all data
- Add Data and ToSchema instances to models
- Switch to TLS http manager so it can connect to https urls
- Add nicer API to call the endpoints
- Add Nix support
* [Haskell Servant] Upgrade Petstore
* [Haskell Servant] Delete old swagger-petstore samples
* [Haskell Servant] Use generics for ToForm and FromForm instances
* [Haskell Servant] Generate ToSchema instance only if it's safe to do
* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.
* Fixed issue #1524 that caused the `useDateTimeOffset` additional property for the `csharp` generator not to work.
* 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