Comments (10)
I do think in practice it's common to have multiple foreign keys on an object, even when the entities they belong to themselves have a parent-child relationship. E.g. if kennel belongs to store and pet belongs to kennel, you will often find pets with both kennel_id and store_id, even though you can find the store_id through one indirection.
from cadl.
Why does this trigger unhandled promise rejection?
from cadl.
That probably escapes the new catch-all in the language server.
from cadl.
That was in the cli not language server, didn't check if it crashed that
from cadl.
Seems like there's a missing await somewhere too here?
from cadl.
Side note: do we want to support multiple keys per model type? We could get rid of the error entirely.
from cadl.
Someone was saying during the bug bash review that we were supposed to support that.
from cadl.
It was me! I thought I saw it was required when my model has two keys, like a pet with a store ID and group ID or something. But I see now we just use the parent model relationship so I was mistaken.
from cadl.
Honestly I don't see any reason why we couldn't use either approach. The code I've written is only really concerned with the order of the keys, it could generate a path just fine for a model type with two or more key properties, even if it has multiple parents.
from cadl.
- this issue is about fixing the exception to make it a diagnostic
- Adding a design issue for whether multiple keys can be valid for a resource
from cadl.
Related Issues (20)
- New built-in decorator to mark a known model HOT 2
- can discriminator be optional ? HOT 1
- OneOf property is failing during OAS Schema Validation HOT 3
- Add ability to have suppressions cascade to emitters so that point suppressions in code can happen at the same time.
- Should we include newly added api versions in older api version's OpenAPI spec emitter result HOT 1
- [rest] Need a way to detect properties cloned by KeysOf HOT 5
- [compiler] Optional description for `@pattern` HOT 1
- Non-working link in emitter docs HOT 2
- Error type gets carried in templates HOT 1
- Should a enum be allowed for the value of the content type header HOT 1
- Library/Emitter authoring documentation is not usable
- Emitter framework feedback HOT 3
- Missing @madeRequired decorator for versioning HOT 1
- Discuss `extends` base type for union HOT 8
- Discuss implicit discriminator for union
- Add warning if union variant name doesn't match discriminator property key HOT 1
- Document `compilerVersion` template functionality HOT 1
- Template without `compilerVersion` shouldn't give user a warning that their compiler might be too old HOT 1
- Template with a compilerVersion that is a semver range doesn't work HOT 1
- `tsp watch` should maybe be able to watch files read by emitters/libraries
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 cadl.