@@ -163,15 +163,10 @@ module FieldPrinter
163
163
include ArgsPrinter
164
164
include DescriptionPrinter
165
165
def print_fields ( type )
166
- <<<<<<< 137 bcc8f6ab8d063ceff257cb4d00bf661f71d43
167
- type . all_fields . map . with_index { |field , i |
166
+ fields = type . all_fields . select { | f | schema . visible_field? ( f ) }
167
+ fields . map . with_index { |field , i |
168
168
"#{ print_description ( field , ' ' , i == 0 ) } " \
169
169
" #{ field . name } #{ print_args ( field , ' ' ) } : #{ field . type } #{ print_deprecated ( field ) } "
170
- =======
171
- # TODO: filter
172
- type . all_fields . map { |field |
173
- " #{ field . name } #{ print_args ( field ) } : #{ field . type } #{ print_deprecated ( field ) } "
174
- >>>>>>> feat ( Mask ) hide some types in schema print -out
175
170
} . join ( "\n " )
176
171
end
177
172
end
@@ -212,11 +207,15 @@ def self.print(type, schema)
212
207
else
213
208
implementations = nil
214
209
end
210
+ <<<<<<< 971205 bf4f2a871cc525d07b1d1873cac8212acd
215
211
216
212
"#{ print_description ( type ) } " \
217
213
"type #{ type . name } #{ implementations } {\n " \
218
214
"#{ print_fields ( type ) } \n " \
219
215
"}"
216
+ =======
217
+ "type #{ type . name } #{ implementations } {\n #{ print_fields ( type , schema ) } \n }"
218
+ >>>>>>> feat ( Mask ) filter fields in Schema ::Printer
220
219
end
221
220
end
222
221
@@ -228,8 +227,12 @@ def self.print(type)
228
227
"#{ print_description ( type ) } " \
229
228
=======
230
229
def self . print ( type , schema )
230
+ <<<<<<< 971205 bf4f2a871cc525d07b1d1873cac8212acd
231
231
>>>>>>> feat ( Mask ) hide some types in schema print -out
232
232
"interface #{ type . name } {\n #{ print_fields ( type ) } \n }"
233
+ =======
234
+ "interface #{ type . name } {\n #{ print_fields ( type , schema ) } \n }"
235
+ >>>>>>> feat ( Mask ) filter fields in Schema ::Printer
233
236
end
234
237
end
235
238
0 commit comments