This adds an x-is-free-form vendor extension to allow users to skip our
"free-form" logic which would previously prevent object schemas with no
properties to be considered "free-form". The previous behavior was due
in part to Swagger Parser not exposing `additionalProperties: false` to
us (which should be similar behavior to this extension).
A free-form object is considered a dynamic object with any number of
properties/types. DefaultGenerator does not allow for generation of
models considered free-form. However, a base type with no properties and
no additional properties is allowed by OpenAPI Specification and is
meaningful in many languages (e.g. "marker interfaces" or abstract
closed types).
* Update apiInvoker.mustache
In scala-akka-client code that is getting generated, addAuthentication method is called after setting headers using header parameter in the below mentioned line
addAuthentication(request.credentials)(
httpRequest.withHeaders(headers(request.headerParams))
)
However, in addAuthentication method, we are using withHeaders method that overwrites the headers set using header parameters. So, I am proposing to
change the addAuthentication method be replacing withHeaders() method to addHeader() to add authentication header to the list of already existing headers.
* Update ApiInvoker.scala
Added changes to sample for the client generator code change
* Provide getter `values` for all enum values
* Add values getter also to inline enum
* Generate samples
Co-authored-by: SimonIT <simonit.orig@gmail.com>
* FILES is now path relative with no prefixes
some Java implementations don't honor .relativize documentation fully.
When outDir is /a/b and the input is /a/b/c/d, the result should be c/d.
Some implementations make the output ./c/d which seems to mix the logic
as documented for symlinks. So we need to trim any / or ./ from the start,
as nobody should be generating into system root and our expectation is no ./
This resolves regeneration issues for those on such Java
implementations, although we've not been able to track down the exact
vendor or configurations which might lead to these differences.
* Ensure windows outputs FILES paths in same format
* Normalize FILES paths to remove relativization mid-path
* Correct date format of date formatted strings
* Update petstore
* Regenerate samples on linux
* Remove final for letting the user configure custom date formats
Co-authored-by: SimonIT <simonit.orig@gmail.com>
* First approach for discussion
* typo
* add addiotional method
* polish a bit
* remove call of super method
* fix javadoc error
* com.google.common.collect.
* merge master regenerate samples
* sort imports alphabetically
* sort imports alphabetically with right key
* typo
* add type previous imports are still there.
* add type previous imports are still there.
* remove new test to see if they are the problem.
* merge master add tests back in
* align changes which should not lead to failing test but you never know.
* remove formatting changes
* dummy change
* revert spaces
* revert spaces
* revert functional changes
* comment out test
* remove model
* remove interface method
* remove test class completely
* put test class back - test body commented out
* rename test methods
* put back logic and tests
* remove generated APIs
* remark amakhrov
* check in one generated file to test
* adjust call super
* add comment use set.
for required fields better. This change ensures the required field isn't
overridden with undefined when the object is constructed - especially through
a chain of constructFromObject calls..
* Adds example setting code in python-experimental with one fn setting example values
Fixes sample indentations
Handles composed schema models, object model and arraymodels
Adds brackets in arraymodel input
Sets modelName with map schemas
Removes included_schemas arguments, dicriminator examples do not include property examples
Refactors modelName into toExampleValueRecursive argument
Fixes bug where example models contained themselves
Stops using model ExampleGenerator examples because they are inconsistent with the ones in python-experimental
Uses example values if they exist
Removes single quotes from enum examples
Fixes password example
Adds commented our regex handling, commented out because it breaks
Handles AnyType schema examples
Adds x_example values for simple string properties, uses toExampleValue for all example generation
Adds examples for simple string parameters
Updates comments in toExampleValueBase
Fixes the double nested bug for AdditionalPropertiesWithArrayOfEnums
Fixes bug where NumberWithValidations had double nesting
Updates simple string examples in arrays
Fixes array string examples
Fixes example for string endpoint body example
Adds exampleFromStringOrArraySchema
Adds regex examples, pegs slf4j-version to v1.7.29 for rgxgen
Adds comment about regex seed
Updates pattern matcher to not handle ^ and $
Updates used sample values
Adds ensureQuotes
Adds ensureQuotes
Fixes double quote bug
Updates mustache file
Adds ensureQuotes to key handling
Adds modelNameToSchema map, reduces run time by using it
Fixes java tests
Regenerates python-experimental samples
Fixes python test
* Rebased on master
* Adds getModelNameToSchemaCache
* Updates toDefaultValue to not mutate schemas
* Has all dates and datetimes default and example setting use the same helper function
* Samples regenerated
* indentation tweak, removes txt from sample file
* Added library and edited generator to support server stub generation with Kumuluzee framework.
* Trimmed and tweaked pom.xml template and removed unnecessary template files from generator and library.
* minor edits
* Added new library to Java client codegen (microprofile-kumuluzee). A
functional KumuluzEE REST client can now be generated.
* Edited README for microprofile-kumuluzee
* Edited docs to include new KumuluzEE library options.
* Updated kee-rest-client client POM dependency version to latest
* fixed pom, edited REAMDE
* Trimmed redundant dependencies from KEE client pom
* Removed unnecessary DefaultGenerator edit, modified config template accordingly.
* Made mp framework an additional property for microprofile instead of being another library option, removed now redundant library files.
* Updated documentation with microprofile framework
* Fixed errors caused by removed functions and variables
* update doc
Co-authored-by: Chuckledog <aljaz.pavsic@gmail.com>
Co-authored-by: Jan Meznaric <jmezna@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* update spec
* fix datetime default value
* fix the issues when the class name is not in pascal case
* Update modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache
Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>
* update samples
Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>
* update csharp-netcore dependencies
* update test sdk version
* set tests.sdk version to 15.9.2
* rearrange test
* vs 2019 image
* rollback to v4.61.0
* update Microsoft.NET.Test.Sdk version
* Revert "update Microsoft.NET.Test.Sdk version"
This reverts commit 7a86bfc4151d5d23667129e242ad911db5d33598.
* rollback Microsoft.NET.Test.Sdk
The "..._parseFromJSON" template was buggy because the name of the _e type used was not the same than the generated.
See the first argument of "..._convertToJSON" to see that the _e type used there was not the same
* Add samples composer.lock to root .gitignore
composer.lock may produce CI errors when you need to test build against
different PHP versions. However users most likely want to commit this
file, so I think it's better to exclude it only in root .gitignore.
* Commit composer.lock in default PHP templates
* Refresh samples
* Update play framework minor version + scala + swagger-ui + Remove bugs in the url of swagger-ui.
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>