forked from witchdrash/angular2-swagger-client-generator
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for string enum parameters and inline model enums. Note…
… that TypeScript 2.4 is required to support string initializers in generated enums.
- Loading branch information
Showing
5 changed files
with
27 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,9 @@ node_modules | |
.vscode | ||
.idea | ||
bin | ||
lib | ||
obj | ||
out | ||
output | ||
temp | ||
lib | ||
npm-debug.log |
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
ad82a23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit results in invalid output, if the same enum is used in multiple data types. As an example, try generating the api for https://www.maptology.com/api/maptology.json. The OS enum will be generated for Device and DeviceHandle and the result will not compile due to a duplicate definition of OS. I think it is necessary to either "merge" the enums (which seems complicated) or to give them a local name, e.g. "DeviceHandle_OS" or something.