File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 55* Add "responses" information from AS3 tasks to FAST tasks
66* Add operation information (e.g., update vs delete) to FAST tasks
77* Merge definitions and default parameters from base templates
8+ * Save additional, top-level properties found on YAML templates
89
910## Fixed
1011* Missing type schema when merging templates
Original file line number Diff line number Diff line change @@ -457,13 +457,15 @@ class Template {
457457 const tmpl = new this ( ) ;
458458 const yamldata = yaml . safeLoad ( yamltext ) ;
459459 tmpl . _recordSource ( 'YAML' , yamltext ) ;
460- tmpl . templateText = yamldata . template ;
461460
462- if ( yamldata . title ) tmpl . title = yamldata . title ;
463- if ( yamldata . description ) tmpl . description = yamldata . description ;
464- if ( yamldata . definitions ) tmpl . definitions = yamldata . definitions ;
465- if ( yamldata . parameters ) tmpl . defaultParameters = yamldata . parameters ;
466- if ( yamldata . contentType ) tmpl . contentType = yamldata . contentType ;
461+ Object . assign ( tmpl , yamldata ) ;
462+ tmpl . templateText = tmpl . template || tmpl . templateText ;
463+ delete tmpl . template ;
464+ tmpl . defaultParameters = tmpl . parameters || tmpl . defaultParameters ;
465+ delete tmpl . parameters ;
466+ delete tmpl . anyOf ;
467+ delete tmpl . oneOf ;
468+ delete tmpl . anyOf ;
467469
468470 const oneOf = yamldata . oneOf || [ ] ;
469471 const allOf = yamldata . allOf || [ ] ;
You can’t perform that action at this time.
0 commit comments