Comments (2)
This is an interesting requirement. It feels like syntactic sugar for "create a new type with name TOpt, copying all the fields from the existing type T and making them optional." Do you agree? In particular it doesn't seem like there's a runtime relationship between TOpt and T, although there is a semantic relationship.
I.e. T is a subset of TOpt, but TOpt is not a subset of T. This troubles me somewhat because it means folks will pass Ts and TOpts around their application, while the mapping is not bidirectional:
- Any valid instance of T is a valid instance of TOpt
- Any valid instance of TOpt is not necessarily a valid instance of T
- this makes sense for UPDATE/PATCH because one is guaranteed that T already exists, and the fields in TOpt will be updated.
If things like Pick/Omit are also included then the types diverge even further.
from concerto.
create a new type with name TOpt, copying all the fields from the existing type T and making them optional.
I agree.
Having some kind of runtime relationship could be helpful to allow clients to take shortcuts (like patching), when we have more information about the state of entities.
from concerto.
Related Issues (20)
- Performance updates for uniqueness checks
- Namespaces vulnerable to ReDoS HOT 1
- Fix breaking chnages coming up from lerna
- Create a linter for Concerto HOT 14
- Semantic Validation Rules
- Add error codes to property validation errors HOT 2
- Fix `no such file or directory error` inside in decoratormanager.js Test File
- Standardize/localize error messaging
- Make `accept` methods of introspection classes public HOT 1
- Factory doesn't generate empty entities HOT 1
- Make serializer option `strictQualifiedDateTimes` default behaviour
- Extends support for enum declarations HOT 3
- LocalDateTime
- Update CTO grammar for Import Aliasing HOT 2
- Update CTO printer for Import Aliasing
- Optimizations for applying decorators on a model
- Vocabularies don't support namespace-scoped decorators HOT 1
- Update runtime classes to understand import aliasing
- Serialization exception when declaring a default false boolean field
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 concerto.