-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAPI emitter deduplicating parameters #1118
Comments
We do want to trace the lineage of the KeysOf to the original model type that it came from. For Python, an example of code we (want to be able to emit) is: class Cat:
id: str
name: str
class CatClient:
def update_cat(self, cat: str | Cat, *, name: str | None = None) -> Cat: ... In other words, take either the key properties of a resource or an instance of the resource as the argument to the method. |
I've put together a proposal in the form of a PR that implements it: We can review the PR description and small diff in the design meeting. |
This was approved. |
closing in favor of the PR |
As part of this PR(#1115) fixing various issue around parent and sourceProperty reference in projections the result was that parameters where always inlined when using
KeysOf
.One option is to call
@friendlyName
inKeysOf
but just doing that result in the shared parameter to be calledPetKeys
if there is a single key.The text was updated successfully, but these errors were encountered: