Expose showMessagesFromReferences on the CLI as it provides much more useful information when validating Bundles.
This commit is contained in:
parent
9a66c87a05
commit
59902b6b9a
|
@ -149,6 +149,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IPackageInst
|
|||
@Getter @Setter private boolean securityChecks;
|
||||
@Getter @Setter private boolean crumbTrails;
|
||||
@Getter @Setter private boolean allowExampleUrls;
|
||||
@Getter @Setter private boolean showMessagesFromReferences;
|
||||
@Getter @Setter private Locale locale;
|
||||
@Getter @Setter private List<ImplementationGuide> igs = new ArrayList<>();
|
||||
@Getter @Setter private boolean showTimes;
|
||||
|
@ -495,6 +496,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IPackageInst
|
|||
validator.setSecurityChecks(securityChecks);
|
||||
validator.setCrumbTrails(crumbTrails);
|
||||
validator.setAllowExamples(allowExampleUrls);
|
||||
validator.setShowMessagesFromReferences(showMessagesFromReferences);
|
||||
validator.getContext().setLocale(locale);
|
||||
validator.setFetcher(this);
|
||||
validator.getImplementationGuides().addAll(igs);
|
||||
|
|
|
@ -26,6 +26,8 @@ public class CliContext {
|
|||
private boolean hintAboutNonMustSupport = false;
|
||||
@JsonProperty("recursive")
|
||||
private boolean recursive = false;
|
||||
@JsonProperty("showMessagesFromReferences")
|
||||
private boolean showMessagesFromReferences = false;
|
||||
@JsonProperty("doDebug")
|
||||
private boolean doDebug = false;
|
||||
@JsonProperty("assumeValidRestReferences")
|
||||
|
@ -200,6 +202,17 @@ public class CliContext {
|
|||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("showMessagesFromReferences")
|
||||
public boolean isShowMessagesFromReferences() {
|
||||
return showMessagesFromReferences;
|
||||
}
|
||||
|
||||
@JsonProperty("showMessagesFromReferences")
|
||||
public CliContext setShowMessagesFromReferences(boolean showMessagesFromReferences) {
|
||||
this.showMessagesFromReferences = showMessagesFromReferences;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("locale")
|
||||
public String getLanguageCode() {
|
||||
return locale;
|
||||
|
|
|
@ -242,6 +242,7 @@ public class ValidationService {
|
|||
validator.setLocale(cliContext.getLocale());
|
||||
validator.setSnomedExtension(cliContext.getSnomedCTCode());
|
||||
validator.setAssumeValidRestReferences(cliContext.isAssumeValidRestReferences());
|
||||
validator.setShowMessagesFromReferences(cliContext.isShowMessagesFromReferences());
|
||||
validator.setNoExtensibleBindingMessages(cliContext.isNoExtensibleBindingMessages());
|
||||
validator.setNoInvariantChecks(cliContext.isNoInvariants());
|
||||
validator.setWantInvariantInMessage(cliContext.isWantInvariantsInMessages());
|
||||
|
|
|
@ -24,6 +24,7 @@ public class Params {
|
|||
public static final String DEBUG = "-debug";
|
||||
public static final String SCT = "-sct";
|
||||
public static final String RECURSE = "-recurse";
|
||||
public static final String SHOW_MESSAGES_FROM_REFERENCES = "-showReferenceMessages";
|
||||
public static final String LOCALE = "-locale";
|
||||
public static final String STRICT_EXTENSIONS = "-strictExtensions";
|
||||
public static final String HINT_ABOUT_NON_MUST_SUPPORT = "-hintAboutNonMustSupport";
|
||||
|
@ -148,6 +149,8 @@ public class Params {
|
|||
cliContext.setSnomedCT(args[++i]);
|
||||
} else if (args[i].equals(RECURSE)) {
|
||||
cliContext.setRecursive(true);
|
||||
} else if (args[i].equals(SHOW_MESSAGES_FROM_REFERENCES)) {
|
||||
cliContext.setShowMessagesFromReferences(true);
|
||||
} else if (args[i].equals(LOCALE)) {
|
||||
if (i + 1 == args.length) {
|
||||
throw new Error("Specified -locale without indicating locale");
|
||||
|
|
Loading…
Reference in New Issue