forked from swagger-api/swagger-core
-
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.
Change the model parsing to support generic types.
Purpose: 1. Support generic types in method return type. 2. Support generic types in super class. 3. Support generic array types. When parsing the generic types, the type parameters can be successfully replaced by the actual type rather than just Objects. The changes: 1. Use ClassWrapper to parse the super class and method return types 2. Use ClassWrapper to parse the type string in SwaggerContext.loadClass 3. Change ComplexTypeMatcher to match built-in container types only 4. In ModelConverters, include all type parameters when addRecursive 5. Change ModelPropertyParser to use generic types when parsing methods and fields Minor changes: 1. In JavaDateTimeOverride test case, revert the change to ModelConverts to avoid impacting other test cases. Otherwise if other test cases with date fields run after this case, they will fail. 2. In swagger UI, changed SwaggerOperation.prototype.isListType to check arrays rather than any type contains "[". SwaggerOperation.prototype.isListType = function(type) { - if (type && type.indexOf('[') >= 0) { + if (type && type.indexOf('array[') >= 0) { 3. In ReaderUtil fixed groupByResourcePath to merge models
- Loading branch information
Shu Zhang
committed
Mar 30, 2014
1 parent
a4b6cd0
commit 207307d
Showing
17 changed files
with
135 additions
and
117 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
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.