diff options
author | 2024-06-28 18:58:50 +0200 | |
---|---|---|
committer | 2024-06-28 18:58:50 +0200 | |
commit | 2e8a2f6a80fbd974ad877aeee4ef76b740831311 (patch) | |
tree | 21aa932352a94ca0a811e60e474ab8e57cc84d4d /subprojects/frontend/src/xtext/xtextServiceResults.ts | |
parent | refactor(reasoning): fix Sonar warnings (diff) | |
download | refinery-2e8a2f6a80fbd974ad877aeee4ef76b740831311.tar.gz refinery-2e8a2f6a80fbd974ad877aeee4ef76b740831311.tar.zst refinery-2e8a2f6a80fbd974ad877aeee4ef76b740831311.zip |
refactor: show semantics even if propagation fails
Diffstat (limited to 'subprojects/frontend/src/xtext/xtextServiceResults.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/xtextServiceResults.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/subprojects/frontend/src/xtext/xtextServiceResults.ts b/subprojects/frontend/src/xtext/xtextServiceResults.ts index 792c7de3..c5bc1320 100644 --- a/subprojects/frontend/src/xtext/xtextServiceResults.ts +++ b/subprojects/frontend/src/xtext/xtextServiceResults.ts | |||
@@ -162,7 +162,7 @@ export const RelationMetadata = z.object({ | |||
162 | 162 | ||
163 | export type RelationMetadata = z.infer<typeof RelationMetadata>; | 163 | export type RelationMetadata = z.infer<typeof RelationMetadata>; |
164 | 164 | ||
165 | export const SemanticsSuccessResult = z.object({ | 165 | export const SemanticsModelResult = z.object({ |
166 | nodes: NodeMetadata.array(), | 166 | nodes: NodeMetadata.array(), |
167 | relations: RelationMetadata.array(), | 167 | relations: RelationMetadata.array(), |
168 | partialInterpretation: z.record( | 168 | partialInterpretation: z.record( |
@@ -171,13 +171,13 @@ export const SemanticsSuccessResult = z.object({ | |||
171 | ), | 171 | ), |
172 | }); | 172 | }); |
173 | 173 | ||
174 | export type SemanticsSuccessResult = z.infer<typeof SemanticsSuccessResult>; | 174 | export type SemanticsModelResult = z.infer<typeof SemanticsModelResult>; |
175 | 175 | ||
176 | export const SemanticsResult = z.union([ | 176 | export const SemanticsResult = z.object({ |
177 | z.object({ error: z.string() }), | 177 | model: SemanticsModelResult.optional(), |
178 | z.object({ issues: Issue.array() }), | 178 | error: z.string().min(1).optional(), |
179 | SemanticsSuccessResult, | 179 | issues: Issue.array().optional(), |
180 | ]); | 180 | }); |
181 | 181 | ||
182 | export type SemanticsResult = z.infer<typeof SemanticsResult>; | 182 | export type SemanticsResult = z.infer<typeof SemanticsResult>; |
183 | 183 | ||
@@ -190,7 +190,7 @@ export const ModelGenerationResult = z.union([ | |||
190 | uuid: z.string().min(1), | 190 | uuid: z.string().min(1), |
191 | error: z.string(), | 191 | error: z.string(), |
192 | }), | 192 | }), |
193 | SemanticsSuccessResult.extend({ | 193 | SemanticsModelResult.extend({ |
194 | uuid: z.string().min(1), | 194 | uuid: z.string().min(1), |
195 | }), | 195 | }), |
196 | ]); | 196 | ]); |