* Add test case that reproduce the issue #1782
* Fix missing RequestBody.required
* Update samples
./bin/utils/ensure-up-to-date
* Run ensure-up-to-date script
./bin/utils/ensure-up-to-date
* Add test case that reproduce issues
* Fix a problem that points to a folder that doesn't exist
* Improves for windows
* Run ensure-up-to-date script
./bin/utils/ensure-up-to-date
APIs may more than one auth method (for example both an app key and basic auth).
This changes the example to only initialize the config option once instead of once per auth method.
* [gradle] Add 4 boolean properties supported by codegenConfigurator
* [gradle] Add Windows workaround for Android Studio
After release 3.0.0, a guava dependency was updated and this exposed an
issue in Windows where Guava's CharMatcher.ASCII is called to validate a
path. The version of Guava referenced by OpenAPI Generator causes a
'NoSuchField' error because the referenced dependency names this static
field CharMatcher.Ascii.
This error is not surfaced on macOS, and appears to be Windows-specific.
This adds a potential workaround to the Gradle plugin's readme.
See #1818 for more details.
* Adds two models to the v2.0 spec, uses examples as defaults in python client
* Adds array default and type_holder_default and type_holder_example tests
* Re-generated python security client with ./bin/security/python-petstore.sh
* Changes comment text, rebased master
* Updates client + server samples
* Adds missing samples updates
* Changes python client to look for true or false with booleans in toDefaultValue
* Changes boolean casting to use Boolean.valueOf
* Adds deserialization fix for python tests
* Changes Mock to namedtuple in python deserialization tests
* Actually remove unittest.mock
* fix: force to decode as utf-8 when header contains application/json to avoid text garbling.
The original processing is using `response.body` to deserialize as json.
However, this is decoded by latin1 if the header contains only "application/json" instead of "application/json; charset=utf-8".
Because of this behavior, if the response body is encoded UTF-8 but the headers doesn't contain charset, the body will garbling.
cf: https://github.com/dart-lang/http/issues/175
Since playframework 2.6 returns "Content-Type: application/json" without "charset=utf-8", I changed this parsing algolithm.
* fix: force to decode as utf-8 when header contains application/json to avoid text garbling on error.
* fix: set fields to null if json value is null.
* rebuild dart2 petstore
* rebuild dart petstore
* rebuild petstore
* [DART]fix: set fields to null if json value is null.
* added auth support in apiClient
* added httperror response in detail
* added apikey to apiClient create
* remove unnecessary print statements
* remove freeing of apiclient object from apiclient_free function
* added auth params to apiClient_free function
* free only received data and apiClient object to be freed by user
* Add test case : generateFromResponseSchemaWithArrayOfModel
* Add test case : generateFromResponseSchemaWithArrayOfPrimitiveTypes
* Add test case : generateFromResponseSchemaWithModel
* Add test case : generateFromResponseSchemaWithNoExample
* Use String.format for windows
* Specify locale to prevent issues due to locale
* [java][webclient] register jackson modules on object mapper
* Regenerate client
* Removed findAndRegisterModules() call
* ObjectMapper is initialized only if NOT provided by client
* Remove (now) useless DateFormat inside buildWebClient signature and regenerate client
* [Slim] Add fork of token middleware
This commit will be dropped, when official repo approves submitted PRs.
Right now it's for test purposes only.
* [Slim] Adds token middleware to template
* [Slim] Move auth implementation to external classes
* [Slim] Update readme
* [Slim] Add config example
* [Slim] Remove deprecated package
Considered to use dyorg/slim-token-authentication for all authentication
schemes. User needs to decode and parse Basic token himself, but it's
pretty simple task and there are many code examples in
the web. Most of time solution is two lines of code.
* [Slim] Format phpdoc comments
I've changed PHP version to 7 and updated comments to follow main
recommendations. Used PHPCodesniffer rules are Generic.Commenting,
Squiz.Commenting, PEAR.Commenting. Of course I applied only reasonable
sniffs from this standards.
@category tag has been deleted as deprecated accordingly to
phpDocumentor offical docs.
Ref: http://docs.phpdoc.org/references/phpdoc/tags/category.html
* [Slim] Refresh samples
* Extract a method "flattenPaths" to reduce the scope of method
* Tweak
* Rename parameter name
* Extract a method "flattenModels" to reduce the scope of method
* Rename parameter name
* Rename: models -> components
* Delete comment
* Extract a method "flattenRequestBody" to reduce the scope of method
* Extract a method "flattenParameters" to reduce the scope of method
* Extract a method "flattenResponses" to reduce the scope of method
* Tweak types
* Reduce indentation
* Add test case : arbitraryObjectModelInline
* Delete legacy test case : testArbitraryObjectModelInline
* Add test case : arbitraryObjectModelWithArrayInlineWithoutTitle
* Delete legacy test case : testArbitraryObjectModelWithArrayInlineWithoutTitle
* Add test case : arbitraryObjectModelWithArrayInlineWithTitle
* Delete legacy test case :
testArbitraryObjectModelWithArrayInlineWithTitle
* Add test case : emptyExampleOnStringTypeModels
* Delete legacy test case : testEmptyExampleOnStrinngTypeModels
* Add test case : arbitraryObjectResponse
* Delete legacy test case : testArbitraryObjectResponse
* Add test case : arbitraryObjectResponseArray
* Delete legacy test case : testArbitraryObjectResponseArray
* Add test case : arbitraryObjectResponseArrayInline
* Delete legacy test case : testArbitraryObjectResponseArrayInline
* Add test case : arbitraryObjectResponseWithAdditionalProperty
* Delete legacy test case : testArbitraryObjectResponseMapInline
* Uncomment a valid test case
* Add test case : inline request body with title
* Delete legacy test case
* Delete unused import
* Delete legacy test case which is already implemented by other test
see InlineModelResolverTest#resolveInlineArrayResponseWithTitle()
* Delete legacy test case which is covered by other test
* Add test case : arbitraryObjectBodyParam
* Delete legacy test case : testArbitraryObjectBodyParam
* Add test case : arbitraryObjectRequestBodyProperty
* Delete legacy test case : testArbitraryObjectBodyParamInline
* Add test case : arbitraryRequestBodyArray
* Delete legacy test case : testArbitraryObjectBodyParamWithArray
* Add test case : arbitraryRequestBodyArrayProperty
* Delete legacy test case
* [Slim] Add encodePath method
* [Slim] Add tests for encodePath method
* [Slim] Use unescaped path in router
Both variables basePathWithoutHost and path are already urlEncoded in
codegen itself. Builtin html encoding in mustache is redundant. We can
use these raw codegen values with no fear.
* [Slim] Refresh samples
* [Slim] Add PHP_CodeSniffer config template
* [Slim] Update doc
* [Slim] Add local configs to gitignore
PHPUnit and PHP_CodeSniffer provides the same developing pattern when
user overrides global config with local one. In local config he can
set environment variables. Official doc recommends to not commit local
config files.
* [Slim] Remove phpcsStandard CLI option
Now user have full freedom to override config file. This option is not
used and not necessary anymore.
* [Slim] Refresh samples
* add pet, array of array test, use CompareNetObject for comparision
* add an option, should trigger ci failure
* update doc
* use useCompareNetObjects in csharp-refactor petstore
* fix project template
* Add a test case of resolving inline request body
* Delete legacy test case
* Add a test case of resolve inline request body with required
* Delete legacy test case
* fix discrimintator name not following variable naming convention
* fix test
* update samples
* use discriminator name directly in php
* single quote array index
* Revert "Disable rust-reqwest petstore test"
This reverts commit 9e1cce2e7b.
* Revert "Fix various CI issues (#1722)"
This reverts commit 77270a0118.
* Revert "[Rust] Support formParams and fix list-params. (#1678)"
This reverts commit 4a494b45d3.
* [Rust] Support formParams and fix list-params.
Form params were previously unsupported, and list-params would produce code that didn't compile.
* update rust samples
* [csharp-refactor] Minor changes to JSON mime usage
🐎 This maeks the regex static to reduce GC overhead for active clients.
This also removes the lowercase call on the mimetype before evaluating,
as the regex already uses the inline modifier for case insensitivity.
* [csharp-refactor] Regenerate sample
* [Swift] Update Alamofire version and update tests and Swift version to 4.2 for default and RxSwift variants
* Update promiseKit for Swift 4.0
* Update project files.
* Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator into OpenAPITools-master
# Conflicts:
# samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
* Merge in latest master
* Remove typo in bash file
* Update model.mustache
fix serializable import for cxf-cdi
* Update pojo.mustache
add implements to the pojo if isSerializable is true
* Update model.mustache
add import statement to fix compile issue when {{#serializableModel}} is true
* Update pojo.mustache
remove extra space to prevent unecessary diffs in petstore examples: diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/*
* Add Model.build_from_hash
* Use Model.build_from_hash instead of Model.new.build_from_hash
* Update sample for ruby-client
* Update sample for openapi3 ruby-client
* Generator erlang-proper
Used to generate PropEr generators for property-based testing
* Rearrange *_statem.erl functions and remove *_statem.hrl
* Optional weight function
* Optional argument to override generated values
* Export function with arity 1
* Move syntactic sugar to header file
* Only provide body when its allowed
* The weight function should not depend on the state
* 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