Commit 595518d
committed
fix(schemas): align importDesign with oneOf[File|URL] shape, bump 0.19.1
meshery/schemas commit b08a4f62 tightened MesheryPatternImportRequestBody
from a flat properties object to `oneOf: [MesheryPatternImportFilePayload,
MesheryPatternImportURLPayload]`. That contract shipped in
@meshery/schemas@1.1.0 and is re-exposed here via the bundled
DesignDefinitionV1Beta1OpenApiSchema.
The form schema in importDesign/schema.tsx still walked
`.properties.name`, `.properties.file`, `.properties.url` at the root of
the request body. With the new shape those paths resolve to undefined
and module evaluation throws
TypeError: Cannot read properties of undefined (reading 'name')
the moment any consumer imports from `@sistent/sistent`. Because Sistent
bundles @meshery/schemas inline (tsup `noExternal`), every downstream
Next.js SSR build ships the same crash at `Collecting page data` —
notably meshery-cloud staging on @sistent/sistent@0.19.0.
Resolve the field shapes from the explicit `MesheryPatternImportFilePayload`
and `MesheryPatternImportURLPayload` components so the UI schema continues
to be driven by the API contract rather than duplicating it. `name` and
`file` come from the File variant, `url` from the URL variant; the
top-level description is still sourced from the wrapper.
Bump to 0.19.1 so consumers pinned `^0.19.0` pick up the fix on next
install with no version-bump on their side.
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>1 parent ad11628 commit 595518d
3 files changed
Lines changed: 30 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
6 | 23 | | |
7 | 24 | | |
8 | 25 | | |
9 | 26 | | |
10 | | - | |
| 27 | + | |
11 | 28 | | |
12 | | - | |
| 29 | + | |
13 | 30 | | |
14 | | - | |
| 31 | + | |
15 | 32 | | |
16 | 33 | | |
17 | 34 | | |
18 | 35 | | |
19 | 36 | | |
20 | 37 | | |
21 | 38 | | |
22 | | - | |
| 39 | + | |
23 | 40 | | |
24 | 41 | | |
25 | 42 | | |
| |||
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
| |||
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
58 | | - | |
59 | | - | |
| 75 | + | |
| 76 | + | |
60 | 77 | | |
61 | | - | |
| 78 | + | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
| |||
0 commit comments