66 with open (file , mode = "r" , encoding = "utf-8" ) as f :
77 text = f .read ()
88
9+ # https://github.com/OpenAPITools/openapi-generator/pull/15668
910 text = text .replace ("json['typename']" , "json['__typename']" )
1011 text = text .replace ("json['typename']" , "json['__typename']" )
1112
1213 with open (file , mode = "w" , encoding = "utf-8" ) as f :
1314 f .write (text )
1415
1516
16-
1717with open (file , mode = "r" , encoding = "utf-8" ) as f :
1818 text = f .read ()
1919
2020
2121with open ("package.json" , mode = "r" , encoding = "utf-8" ) as f :
2222 package = json .load (f )
2323
24- package .update ({
25- "author" : "fa0311" ,
26- "license" : "LGPL-3.0-only" ,
27- "repository" : {
28- "type" : "git" ,
29- "url" : "https://github.com/fa0311/twitter-openapi-typescript.git"
30- },
31- "keywords" : [
32- "twitter" ,
33- "api" ,
34- "typescript"
35- ],
36- })
24+ package .update (
25+ {
26+ "author" : "fa0311" ,
27+ "license" : "LGPL-3.0-only" ,
28+ "repository" : {
29+ "type" : "git" ,
30+ "url" : "https://github.com/fa0311/twitter-openapi-typescript.git" ,
31+ },
32+ "keywords" : ["twitter" , "api" , "typescript" ],
33+ }
34+ )
3735
3836
3937with open ("package.json" , mode = "w" , encoding = "utf-8" ) as f :
4240
4341with open ("tsconfig.json" , mode = "r" , encoding = "utf-8" ) as f :
4442 package = json .load (f )
45- package ["compilerOptions" ].update ({
46- "declaration" : True ,
47- "declarationMap" : True ,
48- "sourceMap" : True ,
49- })
43+ package ["compilerOptions" ].update (
44+ {
45+ "declaration" : True ,
46+ "declarationMap" : True ,
47+ "sourceMap" : True ,
48+ }
49+ )
5050
5151
5252with open ("tsconfig.json" , mode = "w" , encoding = "utf-8" ) as f :
53- json .dump (package , f , ensure_ascii = False , indent = 2 )
53+ json .dump (package , f , ensure_ascii = False , indent = 2 )
0 commit comments