Comments (1)
The current process of resolving a composition looks like:
- addComposedValueValidator gets a property which has a composition keyword
- A new dummy-property is initialized to represent the composition (without knowledge about the provided property)
- The dummy-property is generated via the ComposedValueProcessorFactory
- For each composition element another nested dummy-property is generated (this time via the PropertyProcessorFactory, nested inside a CompositionPropertyDecorator)
- Out of all nested dummy-properties a merged-property will be generated which will be used as property type for the property holding the composition (the merged property contains all nested properties of each composition element, several TODOs waiting at that point to not create a merged property if none or only one composition element with nested properties is provided)
- All validators of the first dummy-property will be transferred to the provided property to make sure the property is validated against the composition
To make it possible to determine inside the dummy-property whether it's a composition on object or on property-level the information about the current level has to be provided to the dummy-property via the ComposedValueProcessorFactory.
If the information is available, only create a merged property if the composition is located on object-level
from php-json-schema-model-generator.
Related Issues (20)
- Support for minContains and maxContains
- Incorrectly escaped backslashes in regex in generated code HOT 9
- Make code output stable across multiple runs HOT 7
- Integer property with default 0 is incorrectly nullable HOT 3
- Validation of nested composition causes fatal error
- Access to undeclared property `_propertyValidationState` on simple templates HOT 3
- Incorrect native parameter type on nullable setters in mutable models HOT 5
- Crash on `"type": ["object"]` on object properties
- Inconsistency of generated code when using different methods to declare nullable structures HOT 1
- uuid string type support HOT 1
- No nested schema for composed property HOT 5
- Support number property key HOT 3
- Constructor with explicit argument HOT 1
- Add validateOption to FilterInterface
- ...PropertyProxy::getProperty(): Return value must be of type ...PropertyInterface, null returned in HOT 4
- Stable version HOT 1
- Filter for a property inside a Composition inside an array is not executed
- Error when generating classes with FedEx OpenAPI schema HOT 4
- Serialization Bug: Including Null Properties in JSON Output instead of Excluding Them HOT 1
- Creation of dynamic property for composed item validators on properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-json-schema-model-generator.