-
Notifications
You must be signed in to change notification settings - Fork 85
tsp, use TCGC's name for model property schema and parameter name #2787
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 all commits
bfe989b
7f7ca73
d61a060
d5da0a4
8945013
399b3c0
9e42adb
7c5d86b
6472b88
925d805
a8fb9ce
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 |
|---|---|---|
|
|
@@ -5,35 +5,35 @@ | |
| package com.cadl.literalservice.models; | ||
|
|
||
| /** | ||
| * Defines values for ModelOptionalLiteral. | ||
| * Defines values for ModelOptionalLiteralOptionalLiteral. | ||
| */ | ||
| public enum ModelOptionalLiteral { | ||
| public enum ModelOptionalLiteralOptionalLiteral { | ||
|
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. Hi @srnagar, we now leverage TCGC to generate the name for optional literal enum. And their logic is to concat the literal value to the enum's name. e.g. the definitiion is |
||
| /** | ||
| * Enum value optionalLiteral. | ||
| */ | ||
| OPTIONAL_LITERAL("optionalLiteral"); | ||
|
|
||
| /** | ||
| * The actual serialized value for a ModelOptionalLiteral instance. | ||
| * The actual serialized value for a ModelOptionalLiteralOptionalLiteral instance. | ||
| */ | ||
| private final String value; | ||
|
|
||
| ModelOptionalLiteral(String value) { | ||
| ModelOptionalLiteralOptionalLiteral(String value) { | ||
| this.value = value; | ||
| } | ||
|
|
||
| /** | ||
| * Parses a serialized value to a ModelOptionalLiteral instance. | ||
| * Parses a serialized value to a ModelOptionalLiteralOptionalLiteral instance. | ||
| * | ||
| * @param value the serialized value to parse. | ||
| * @return the parsed ModelOptionalLiteral object, or null if unable to parse. | ||
| * @return the parsed ModelOptionalLiteralOptionalLiteral object, or null if unable to parse. | ||
| */ | ||
| public static ModelOptionalLiteral fromString(String value) { | ||
| public static ModelOptionalLiteralOptionalLiteral fromString(String value) { | ||
| if (value == null) { | ||
| return null; | ||
| } | ||
| ModelOptionalLiteral[] items = ModelOptionalLiteral.values(); | ||
| for (ModelOptionalLiteral item : items) { | ||
| ModelOptionalLiteralOptionalLiteral[] items = ModelOptionalLiteralOptionalLiteral.values(); | ||
| for (ModelOptionalLiteralOptionalLiteral item : items) { | ||
| if (item.toString().equalsIgnoreCase(value)) { | ||
| return item; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.