@@ -999,54 +999,10 @@ describe("OpenAPI3 features", () => {
999
999
get : {
1000
1000
summary : "get summary" ,
1001
1001
description : "get description" ,
1002
- responses : {
1003
- "200" : {
1004
- content : {
1005
- "application/json" : {
1006
- schema : {
1007
- type : "object" ,
1008
- properties : {
1009
- title : { type : "string" } ,
1010
- body : { type : "string" } ,
1011
- } ,
1012
- required : [ "title" , "body" ] ,
1013
- } ,
1014
- } ,
1015
- } ,
1016
- } ,
1017
- } ,
1002
+ responses : { } ,
1018
1003
} ,
1019
1004
} ,
1020
- } ,
1021
- components : {
1022
- schemas : {
1023
- ErrorResponse : {
1024
- type : "object" ,
1025
- properties : {
1026
- error : { type : "string" } ,
1027
- message : { type : "string" } ,
1028
- } ,
1029
- required : [ "error" , "message" ] ,
1030
- } ,
1031
- SearchResponse : {
1032
- type : "object" ,
1033
- properties : {
1034
- title : { type : "string" } ,
1035
- date : { type : "string" } ,
1036
- } ,
1037
- required : [ "title" , "date" ] ,
1038
- } ,
1039
- } ,
1040
- responses : {
1041
- NotFound : {
1042
- content : {
1043
- "application/json" : {
1044
- schema : { $ref : "#/components/schemas/ErrorResponse" } ,
1045
- } ,
1046
- } ,
1047
- } ,
1048
- } ,
1049
- } ,
1005
+ }
1050
1006
} ;
1051
1007
1052
1008
expect ( swaggerToTS ( schema ) ) . toBe (
@@ -1057,26 +1013,14 @@ describe("OpenAPI3 features", () => {
1057
1013
* get description
1058
1014
*/
1059
1015
get: {
1060
- responses: {
1061
- '200': {
1062
- 'application/json': { title: string; body: string }
1063
- }
1064
- }
1016
+ responses: { }
1065
1017
}
1066
1018
};
1067
1019
}
1068
1020
1069
1021
export interface operations {}
1070
1022
1071
- export interface components {
1072
- schemas: {
1073
- ErrorResponse: { error: string; message: string };
1074
- SearchResponse: { title: string; date: string }
1075
- }
1076
- responses: {
1077
- NotFound: { [key: string]: any }
1078
- }
1079
- }` )
1023
+ export interface components {}` )
1080
1024
) ;
1081
1025
} ) ;
1082
1026
} ) ;
0 commit comments