File tree Expand file tree Collapse file tree
packages/api-console-gui/src/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,13 +38,8 @@ export class DataStructure {
3838}
3939
4040export function extractDataStructure ( ds : DataStructure , type : Type ) : any {
41- if ( type . kind === ReflectionKind . class || type . kind === ReflectionKind . objectLiteral ) {
42- if ( ( isReferenceType ( type ) || isBackReferenceType ( type ) ) && ds . asReference ) {
43- const primary = ReflectionClass . from ( type ) . getPrimary ( ) ;
44- return extractDataStructure ( ds . properties [ primary . name ] , primary . type ) ;
45- }
46-
47- return extractDataStructureFromSchema ( ds , ReflectionClass . from ( type ) ) ;
41+ if ( type . kind === ReflectionKind . class && type . classType === Date ) {
42+ return ds . value ;
4843 } else if ( isMapType ( type ) ) {
4944 const v : any = { } ;
5045 if ( ! type . typeArguments ) return ;
@@ -76,6 +71,13 @@ export function extractDataStructure(ds: DataStructure, type: Type): any {
7671 }
7772
7873 return list ;
74+ } else if ( type . kind === ReflectionKind . class || type . kind === ReflectionKind . objectLiteral ) {
75+ if ( ( isReferenceType ( type ) || isBackReferenceType ( type ) ) && ds . asReference ) {
76+ const primary = ReflectionClass . from ( type ) . getPrimary ( ) ;
77+ return extractDataStructure ( ds . properties [ primary . name ] , primary . type ) ;
78+ }
79+
80+ return extractDataStructureFromSchema ( ds , ReflectionClass . from ( type ) ) ;
7981 } else {
8082 return ds . value ;
8183 }
You can’t perform that action at this time.
0 commit comments