* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 56e2b1fb
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 335c304d
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
AutoRefactor cleanup 'AnnotationCleanUp' applied by erefactor:
Simplifies annotation uses:
- empty parentheses will be removed from annotations,
- single members named "value" will be removed from annotations and
only the value will be left.
For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
* [dart][dart-dio] Add support for set types
* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties
* Regenerate all other samples
* Fix broken tests due to invalid cast
* Update documentation
* Regenerate samples
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [rust-server] Add support for Bearer auth
- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.
* Update docs
* Update readme for bearer tokens
* remove trailing slash
* update sample app
* added tests
* bug fix
* Adds test in DefaultGeneratorTest
* Reverts python files
* Does not modify a value of /
* Stops skipping / use case
* update samples
Co-authored-by: Justin Black <justin.a.black@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [Core] Inline Model Resolution of Enums
Enums need to be named types, so handle them as part of inline model resolution
* [Rust Server] Handle models starting with a number correctly
* [Rust Server] Additional trace
* [Rust Server] Add support for oneOf/anyOf
* [Rust Server] Update supported features
* [Rust Server] General template tidy up
* [Rust Server] Implement IntoHeaderValue for wrapped data types
* [Rust Server] Convert from string correctly
* [Rust Server] Test for anyOf/oneOf
* Update samples
* Update docs
* Adds hasValidation to IJsonSchemaValidationProperties
* Adds model validation examples for maxItems, minItems, minProperties, maxProperties, minLength, maxLength, multipleOf
* Adds schemas with pattern validation
* Adds minimum example schemas
* Adds maximum example schemas
* Adds ArrayWithUniqueItems
* Adds exclusiveMinimum schemas
* Adds exclusiveMaximum examples
* adds testModelGetHasValidation
* Adds testPropertyGetHasValidation
* Adds testQueryParametersGetHasValidation
* Uncomments out query parameters
* Adds testHeaderParametersGetHasValidation
* Adds testCookieParametersGetHasValidation
* Adds length assertions for properties and marameters
* Adds testBodyAndResponseGetHasValidation
* Improves validation setting
* Only sets exclusiveMinimum when minimum is set, only set exclusiveMaximum when maximum is set
* Adds fix for rust
* Fixes min and max setting for integers
* Regenerates python samples
* Updates code so python sample does not change
* Adds isNull to all schema classes
* Adds null model and property samples, adds models test of isNull
* Adds isNull tests for parameter and response also
* Reverts version file
* create enum documentation in model
* add newline to fix layout when a markdown table follows a markdown list
* avoid escaping of attributes to make sure documentation is displayed as in the spec
The rule to split a capitalized word with plural didn't work properly,
leading to weird name generation in a few languages. This is an attempt
at fixing it.
* feat: add providedIn for Angular 9+
Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated
for Angular 9+
fix: #6432
* doc: providedIn
infos about providedIn
Mark providedInRoot as deprecated
* doc: run generate-samples for typescript
using typescript-angular-v9-provided-in-any.yaml
* refactor: runned ensure-up-to-date locally
* refactor: api.module.mustache rely on providedIn too
* doc: re-generate samples
Added a Set<String> in toExampleValueRecursive() to keep track of which models we have
generated to avoid an infinite recursion for recursive models. An example of a recursive
model would be a GeoJson GeometryCollection.
Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
* empty arrays are now correctly generated
* default arrays with values are empty
* date/dateTime is now always null in order to prevent compile errors
Added a Set<String> in toExampleValueRecursive() to keep track of which models we have
generated to avoid an infinite recursion for recursive models. An example of a recursive
model would be a GeoJson GeometryCollection.
Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
* rxgen version update
* rgxgen version 1.2
* update rgxgen version to 1.3
* remove start end slash in patterns
* Remove debug logs
* fix logic for removal of backslash
* fix logic for forward-slash removal
* fix logic for removing unwanted characters in regex
* add test for example value for string properties
* improvise regex validation logic for example generation
* complicate regex examples
* regex pattern correction
Co-authored-by: aani <aani>
* [dart-dio] Generate default value builders
* return `null` when there is no default value instead of `"null"`
* use built_value's `_initializeBuilder` to set default values
* [dart-dio] Fix default value formatting in model doc
* [dart][dart-dio] Prevent name clashes with existing dart types
Can not use dart import aliases for now as this is not supported by built_value. This means we need to add potentially clashing names/classes to an `additionalReservedWords` exclusion list. Starting with a basic list of some http/io classes.
Correctly use `importMapping` and `defaultIncludes` this time around. Improve reserved word checking.
This now successfully generates `ModelList`, `ModelFile` and `ModelClient` models which previously were not generated at all or were wrong types.
* Address review comment
* Update generator docs
* correctly generate enums from `mostInnerItems`
* use `datatypeWithEnum` which should always be he correct type
* dart generators prefix inner enums with the classname of the containing class, ensure datatypeWithEnum always matches
* [dart] Properly escape param/var names that clash with Dart types
* [dart] Add tests for var/enumVar names
* note: public and private are no keywords in Dart
* some tests are still wrong, some are commented out
* Fix typo
* [dart] Improve variable name escaping
* add more tests
* [dart] Fix operationId naming
* [dart] Fix upper case var name with leading underscore
* [dart] Correctly support model prefix/suffix
* [dart] Support spaces in property names
* Call super for empty operationId
* [dart] Fix and improve enumVar naming/generation
* use same handling for all 3 generators
* allow `updateEnumVarsWithExtensions` to have access to the data type
* improve `x-enum-values` handling and add supprt for other enum vendor extensions
* remove duplicate and outdated tests from `DartDioModelTest`
* add more tests to `DartModelTest`
* no longer force lowercase enums for plain dart generator (breaking)
* this change also removes the trailing underscore from plain dart generator (breaking)
* [dart] Configure and use import mapping
This prevents models from being generated which would clash with exisiting dart types, e.g. List.
* [dart] Fix decimal format not supported
* [dart-dio] Remove redundant modelToIgnore & ignore dart:core import
* modelToIgnore is now handled via importMappings the same way other generators do this
* choose not to import dart:core as this is available by default
* [dart-dio] EnumClass is a reserved word in built_value
* Review changes
* Fix regenerate docs
* [java][spring] updated template to support proper reactive map type
* [java][spring] supporting unit test for spring boot reactive request map issue
* [java][spring] updated samples
* [java][spring] refactoring the issue test spec
* [ruby] fix oneOf handling
* use previous ruby configs due to issue #4690
* check for oneOf model in base_object
* validate the attributes in partial_oneof_module
* python->python-legacy, python-experimental->python
* test with openjdk8
* test with openjdk11
* comment out rm
* move kotlin tests to circleci
* move kotlin tests
* move tests to circleci
* fix circleci
* rearrange test
* move tests
* use wrapper
Co-authored-by: Justin Black <justin.a.black@gmail.com>
* Add CLI options to remove runtime checks (serialization/deserialization).
* Update templates to support the new parameter
- Generates all the models in a same file to avoid import complexity
- Extract interfaces creator templates to reuse them
* Fix formatting and generate client examples
* Add documentation