-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from amarzavery/fixenum
Add support for Enums
- Loading branch information
Showing
69 changed files
with
1,407 additions
and
258 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- "8" | ||
|
||
script: | ||
- npm -s run-script testci |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ contact [[email protected]](mailto:[email protected]) with any additio | |
|
||
``` yaml | ||
use-extension: | ||
"@microsoft.azure/autorest.modeler": "2.1.22" | ||
"@microsoft.azure/autorest.modeler": "2.1.23" | ||
|
||
pipeline: | ||
typescript/modeler: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@using AutoRest.Core | ||
@using AutoRest.Core.Model | ||
@using AutoRest.TypeScript | ||
@inherits AutoRest.Core.Template<EnumType> | ||
|
||
/** | ||
* Defines values for @(Model.Name). | ||
@if (Model.ExtendedDocumentation != null) | ||
{ | ||
@:@(WrapComment(" * ", Model.ExtendedDocumentation)) | ||
} | ||
* @@readonly | ||
* @@enum {@CodeNamer.Instance.CamelCase(Model.UnderlyingType.Name)} | ||
*/ | ||
export enum @(Model.Name) { | ||
@for (int i = 0; i < Model.Values.Count; i++) | ||
{ | ||
if (Model.Values[i].Description != null) | ||
{ | ||
@:/** | ||
@:@(WrapComment(" * ", Model.Values[i].Description)) | ||
@: */ | ||
} | ||
@:@(CodeNamer.Instance.GetEnumMemberName(Model.Values[i].MemberName)) = @(CodeNamerTS.GetEnumValueName(Model.Values[i].SerializedName, Model.UnderlyingType)), | ||
} | ||
} |
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
Oops, something went wrong.