Closed mint-thompson closed 1 year ago
@jafeltra Thank you for the review!
Identifier
: if you look at StructureDefinitionExporter.setContext
, you'll see that it fishes for extensions before any other type.RemoveDefaultExtensionContextRulesOptimizer
in GoFSH. This optimizer probably doesn't do much of anything anymore. So, the optimizer should change to instead check the context on each extension, and if the only context is the default, remove it so that no Context
keyword is used.
Completes #234 and task CIMPL-1163.
When processing an Extension definition, set the contexts directly on the ExportableExtension object. When doing so, convert paths back to FSH-style paths. When extracting caret value rules on an Extension definition, do not extract any rules for contexts.
Add optimizer plugin to resolve URLs in contexts.
This ended up being a bit simpler than I had anticipated in regards to differentiating between core and non-core resources. Since SUSHI does the hard work of actually resolving contexts, GoFSH gets to use the name of anything that it can fish up, no matter where it came from.