-
Notifications
You must be signed in to change notification settings - Fork 80
Support additional properties in non-legacy Modular #2981
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
Changes from 16 commits
152144a
c272f64
6cbbee3
7757a42
0da5b61
2565bfa
7616479
e04efd8
3e16af3
b44f640
5eaa2ac
ac96594
29442d2
9b99853
888820b
f6a941f
492100b
1ad50e8
2b1473b
6958975
91c68d5
58824b0
560dc17
f1ebea1
0ddabbe
5504dba
36bd11c
5c87a33
22e9f48
84c270e
ff751a5
b511d31
a3f6f4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| export function serializeRecord(item: any, excludeProperties: string[] = []) { | ||
| let res: any = {}; | ||
|
MaryGao marked this conversation as resolved.
Outdated
|
||
| for (let key of Object.keys(item)) { | ||
| if (!excludeProperties.includes(key)) { | ||
| res[key] = item[key] as any; | ||
| } | ||
| } | ||
| return Object.keys(res).length === 0 ? undefined : res; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -394,12 +394,6 @@ const libDef = { | |
| default: paramMessage`Please note the header ${"type"} is not serializable.` | ||
| } | ||
| }, | ||
| "compatible-additional-properties": { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see we enable compatibilityMode option in mgmt plane, will it cause problem?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem for us, I searched in current spec there is no any real additional properties cases yet, that means no The case we received for ImpactReporting is a fake case where the payload has the extra layer of additionalProperties explicitly - https://github.com/Azure/azure-rest-api-specs/pull/33352/files#r2011565369. For long term I would prefer to never turn on |
||
| severity: "warning", | ||
| messages: { | ||
| default: paramMessage`Please note that only compatible additional properties is supported for now. You can enable compatibilityMode to generate compatible additional properties for the model - ${"modelName"}.` | ||
| } | ||
| }, | ||
| "default-response-body-type": { | ||
| severity: "warning", | ||
| messages: { | ||
|
|
@@ -453,6 +447,12 @@ const libDef = { | |
| messages: { | ||
| default: paramMessage`Enum member name ${"memberName"} is normalized to ${"normalizedName"} with "_" prefix.` | ||
| } | ||
| }, | ||
| "property-name-conflict": { | ||
| severity: "warning", | ||
| messages: { | ||
| default: paramMessage`The property name ${"propertyName"} has conflicts with others and please use @clientName to rename it.` | ||
| } | ||
| } | ||
| }, | ||
| emitter: { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.