forked from microsoft/typespec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java codegen, use TCGC enum name for MPG (microsoft#4315)
- fix Azure/autorest.java#2940 - test generated with no diff
- Loading branch information
1 parent
594dc97
commit 91f0042
Showing
17 changed files
with
109 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ain/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentChoiceMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.microsoft.typespec.http.client.generator.mgmt.mapper; | ||
|
||
import com.microsoft.typespec.http.client.generator.core.extension.model.codemodel.ChoiceSchema; | ||
import com.microsoft.typespec.http.client.generator.core.mapper.ChoiceMapper; | ||
import com.microsoft.typespec.http.client.generator.core.mapper.MapperUtils; | ||
import com.microsoft.typespec.http.client.generator.core.model.clientmodel.IType; | ||
|
||
public class FluentChoiceMapper extends ChoiceMapper { | ||
private static final FluentChoiceMapper INSTANCE = new FluentChoiceMapper(); | ||
private FluentChoiceMapper() {} | ||
|
||
public static FluentChoiceMapper getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Override | ||
public IType map(ChoiceSchema enumType) { | ||
return MapperUtils.createEnumType(enumType, true, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...va/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentSealedChoiceMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.microsoft.typespec.http.client.generator.mgmt.mapper; | ||
|
||
import com.microsoft.typespec.http.client.generator.core.extension.model.codemodel.SealedChoiceSchema; | ||
import com.microsoft.typespec.http.client.generator.core.mapper.MapperUtils; | ||
import com.microsoft.typespec.http.client.generator.core.mapper.SealedChoiceMapper; | ||
import com.microsoft.typespec.http.client.generator.core.model.clientmodel.IType; | ||
|
||
public class FluentSealedChoiceMapper extends SealedChoiceMapper { | ||
private static final FluentSealedChoiceMapper INSTANCE = new FluentSealedChoiceMapper(); | ||
private FluentSealedChoiceMapper() {} | ||
|
||
public static FluentSealedChoiceMapper getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Override | ||
public IType map(SealedChoiceSchema enumType) { | ||
return MapperUtils.createEnumType(enumType, false, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters