ljmotta commented on code in PR #2105:
URL:
https://github.com/apache/incubator-kie-tools/pull/2105#discussion_r1439987150
##########
packages/dmn-language-service/src/DmnLanguageService.ts:
##########
@@ -20,61 +20,165 @@
import { DmnDocumentData } from "./DmnDocumentData";
import { DmnDecision } from "./DmnDecision";
import * as path from "path";
+import { DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller";
-const IMPORT = "import";
const INPUT_DATA = "inputData";
const XML_MIME = "text/xml";
-const LOCATION_URI_ATTRIBUTE = "locationURI";
const DECISION_NAME_ATTRIBUTE = "name";
const NAMESPACE = "namespace";
const DMN_NAME = "name";
const DECISION = "decision";
const DEFINITIONS = "definitions";
+interface ImportedModelsByModelResources {
+ modelResources: DmnLanguageServiceImportedModelResources[];
+ normalizedPosixPathRelativeToWorkspaceRoot?: undefined;
+}
+
+interface ImportedModelsByNormalizedPosixPathRelativeToWorkspaceRoot {
+ modelResources?: undefined;
+ normalizedPosixPathRelativeToWorkspaceRoot: string;
+}
+
+type ImportedModelsParams = ImportedModelsByModelResources |
ImportedModelsByNormalizedPosixPathRelativeToWorkspaceRoot;
Review Comment:
Indeed, the naming is not helping. This XOR type is used on the
`getImportedModel` method. I guess it wasn't a good idea to support two
different behaviors in the same method? 😓
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]