lutaml-jsonschema 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/frontend/src/components/DetailPanel.vue +52 -47
- data/lib/lutaml/jsonschema/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d756394e76dba6d56e58308f5b5bf05dee2426f3ed1f06741db6d42e2b9b0722
|
|
4
|
+
data.tar.gz: 1dda2ab2e8d89fc28c62df3a278d4bba0ef3e0bcb21a38176fc3816c4922927d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24cc7e89987cd5d49cf5bda35a6a43af05f6de286755d2f324128eca05d643972095eb56d9375406f714ebf11f2b5731563d02f2c8a20f6972fc056ba0727b94
|
|
7
|
+
data.tar.gz: 9d65c1d9e86e2321d561f5853ac2d1617231b267f0ff0d32dbeab6e28f6b4067ecf1fc5fa8458df7db49fbe6dc4fc0e6cf8664abaf5f4a714b7a48cb3ca2442c
|
|
@@ -34,35 +34,35 @@
|
|
|
34
34
|
<span class="meta-label">Type</span>
|
|
35
35
|
<span class="badge badge-type">{{ itemType }}</span>
|
|
36
36
|
</div>
|
|
37
|
-
<div v-if="
|
|
37
|
+
<div v-if="propertyItem?.format" class="meta-row">
|
|
38
38
|
<span class="meta-label">Format</span>
|
|
39
|
-
<span class="badge badge-format">{{
|
|
39
|
+
<span class="badge badge-format">{{ propertyItem.format }}</span>
|
|
40
40
|
</div>
|
|
41
41
|
<div v-if="itemDescription" class="meta-row">
|
|
42
42
|
<span class="meta-label">Description</span>
|
|
43
43
|
<span class="text-secondary">{{ itemDescription }}</span>
|
|
44
44
|
</div>
|
|
45
|
-
<div v-if="
|
|
45
|
+
<div v-if="propertyItem" class="meta-row">
|
|
46
46
|
<span class="meta-label">Required</span>
|
|
47
|
-
<span :class="['badge',
|
|
48
|
-
{{
|
|
47
|
+
<span :class="['badge', propertyItem.required ? 'badge-required' : 'badge-optional']">
|
|
48
|
+
{{ propertyItem.required ? 'Yes' : 'No' }}
|
|
49
49
|
</span>
|
|
50
50
|
</div>
|
|
51
|
-
<div v-if="
|
|
51
|
+
<div v-if="propertyItem?.deprecated" class="meta-row">
|
|
52
52
|
<span class="meta-label">Status</span>
|
|
53
53
|
<span class="badge badge-deprecated">Deprecated</span>
|
|
54
54
|
</div>
|
|
55
|
-
<div v-if="
|
|
55
|
+
<div v-if="propertyItem?.ref" class="meta-row">
|
|
56
56
|
<span class="meta-label">Reference</span>
|
|
57
|
-
<span class="font-mono text-secondary">{{
|
|
57
|
+
<span class="font-mono text-secondary">{{ propertyItem.ref }}</span>
|
|
58
58
|
</div>
|
|
59
|
-
<div v-if="
|
|
59
|
+
<div v-if="propertyItem?.compositionSource" class="meta-row">
|
|
60
60
|
<span class="meta-label">Source</span>
|
|
61
|
-
<span class="badge badge-composition-detail">{{
|
|
61
|
+
<span class="badge badge-composition-detail">{{ propertyItem.compositionSource }}</span>
|
|
62
62
|
</div>
|
|
63
|
-
<div v-if="
|
|
63
|
+
<div v-if="propertyItem?.default" class="meta-row">
|
|
64
64
|
<span class="meta-label">Default</span>
|
|
65
|
-
<span class="font-mono">{{
|
|
65
|
+
<span class="font-mono">{{ propertyItem.default }}</span>
|
|
66
66
|
</div>
|
|
67
67
|
<div v-if="item.kind === 'schema' && schema.required.length" class="meta-row">
|
|
68
68
|
<span class="meta-label">Required</span>
|
|
@@ -102,75 +102,75 @@
|
|
|
102
102
|
</div>
|
|
103
103
|
|
|
104
104
|
<!-- Constraints for property -->
|
|
105
|
-
<div v-if="
|
|
105
|
+
<div v-if="propertyItem && hasConstraints" class="detail-section">
|
|
106
106
|
<h3 class="detail-heading">Constraints</h3>
|
|
107
107
|
<table class="table constraint-table">
|
|
108
108
|
<tbody>
|
|
109
|
-
<tr v-if="
|
|
109
|
+
<tr v-if="propertyItem.minimum != null">
|
|
110
110
|
<td class="constraint-key">Minimum</td>
|
|
111
|
-
<td>{{
|
|
111
|
+
<td>{{ propertyItem.minimum }}</td>
|
|
112
112
|
</tr>
|
|
113
|
-
<tr v-if="
|
|
113
|
+
<tr v-if="propertyItem.maximum != null">
|
|
114
114
|
<td class="constraint-key">Maximum</td>
|
|
115
|
-
<td>{{
|
|
115
|
+
<td>{{ propertyItem.maximum }}</td>
|
|
116
116
|
</tr>
|
|
117
|
-
<tr v-if="
|
|
117
|
+
<tr v-if="propertyItem.minLength != null">
|
|
118
118
|
<td class="constraint-key">Min Length</td>
|
|
119
|
-
<td>{{
|
|
119
|
+
<td>{{ propertyItem.minLength }}</td>
|
|
120
120
|
</tr>
|
|
121
|
-
<tr v-if="
|
|
121
|
+
<tr v-if="propertyItem.maxLength != null">
|
|
122
122
|
<td class="constraint-key">Max Length</td>
|
|
123
|
-
<td>{{
|
|
123
|
+
<td>{{ propertyItem.maxLength }}</td>
|
|
124
124
|
</tr>
|
|
125
|
-
<tr v-if="
|
|
125
|
+
<tr v-if="propertyItem.pattern">
|
|
126
126
|
<td class="constraint-key">Pattern</td>
|
|
127
|
-
<td class="font-mono">{{
|
|
127
|
+
<td class="font-mono">{{ propertyItem.pattern }}</td>
|
|
128
128
|
</tr>
|
|
129
|
-
<tr v-if="
|
|
129
|
+
<tr v-if="propertyItem.enum?.length">
|
|
130
130
|
<td class="constraint-key">Enum</td>
|
|
131
|
-
<td>{{
|
|
131
|
+
<td>{{ propertyItem.enum.join(', ') }}</td>
|
|
132
132
|
</tr>
|
|
133
|
-
<tr v-if="
|
|
133
|
+
<tr v-if="propertyItem.itemsType">
|
|
134
134
|
<td class="constraint-key">Items</td>
|
|
135
|
-
<td>{{
|
|
135
|
+
<td>{{ propertyItem.itemsType }}</td>
|
|
136
136
|
</tr>
|
|
137
|
-
<tr v-if="
|
|
137
|
+
<tr v-if="propertyItem.exclusiveMinimum != null">
|
|
138
138
|
<td class="constraint-key">Exclusive Min</td>
|
|
139
|
-
<td>{{
|
|
139
|
+
<td>{{ propertyItem.exclusiveMinimum }}</td>
|
|
140
140
|
</tr>
|
|
141
|
-
<tr v-if="
|
|
141
|
+
<tr v-if="propertyItem.exclusiveMaximum != null">
|
|
142
142
|
<td class="constraint-key">Exclusive Max</td>
|
|
143
|
-
<td>{{
|
|
143
|
+
<td>{{ propertyItem.exclusiveMaximum }}</td>
|
|
144
144
|
</tr>
|
|
145
|
-
<tr v-if="
|
|
145
|
+
<tr v-if="propertyItem.minItems != null">
|
|
146
146
|
<td class="constraint-key">Min Items</td>
|
|
147
|
-
<td>{{
|
|
147
|
+
<td>{{ propertyItem.minItems }}</td>
|
|
148
148
|
</tr>
|
|
149
|
-
<tr v-if="
|
|
149
|
+
<tr v-if="propertyItem.maxItems != null">
|
|
150
150
|
<td class="constraint-key">Max Items</td>
|
|
151
|
-
<td>{{
|
|
151
|
+
<td>{{ propertyItem.maxItems }}</td>
|
|
152
152
|
</tr>
|
|
153
|
-
<tr v-if="
|
|
153
|
+
<tr v-if="propertyItem.uniqueItems">
|
|
154
154
|
<td class="constraint-key">Unique Items</td>
|
|
155
155
|
<td>Yes</td>
|
|
156
156
|
</tr>
|
|
157
|
-
<tr v-if="
|
|
157
|
+
<tr v-if="propertyItem.multipleOf != null">
|
|
158
158
|
<td class="constraint-key">Multiple Of</td>
|
|
159
|
-
<td>{{
|
|
159
|
+
<td>{{ propertyItem.multipleOf }}</td>
|
|
160
160
|
</tr>
|
|
161
|
-
<tr v-if="
|
|
161
|
+
<tr v-if="propertyItem.const != null">
|
|
162
162
|
<td class="constraint-key">Const</td>
|
|
163
|
-
<td class="font-mono">{{
|
|
163
|
+
<td class="font-mono">{{ propertyItem.const }}</td>
|
|
164
164
|
</tr>
|
|
165
|
-
<tr v-if="
|
|
165
|
+
<tr v-if="propertyItem.contentMediaType">
|
|
166
166
|
<td class="constraint-key">Content Type</td>
|
|
167
|
-
<td>{{
|
|
167
|
+
<td>{{ propertyItem.contentMediaType }}</td>
|
|
168
168
|
</tr>
|
|
169
|
-
<tr v-if="
|
|
169
|
+
<tr v-if="propertyItem.contentEncoding">
|
|
170
170
|
<td class="constraint-key">Content Encoding</td>
|
|
171
|
-
<td>{{
|
|
171
|
+
<td>{{ propertyItem.contentEncoding }}</td>
|
|
172
172
|
</tr>
|
|
173
|
-
<tr v-if="
|
|
173
|
+
<tr v-if="propertyItem.additionalProperties === false">
|
|
174
174
|
<td class="constraint-key">Additional Props</td>
|
|
175
175
|
<td>Denied</td>
|
|
176
176
|
</tr>
|
|
@@ -296,8 +296,8 @@ function formatExample(value: unknown): string {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
const hasConstraints = computed(() => {
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
const p = propertyItem.value
|
|
300
|
+
if (!p) return false
|
|
301
301
|
return p.minimum != null || p.maximum != null ||
|
|
302
302
|
p.minLength != null || p.maxLength != null ||
|
|
303
303
|
p.pattern || p.enum?.length || p.itemsType ||
|
|
@@ -374,6 +374,11 @@ const currentTabs = computed<{ id: TabId; label: string }[]>(() => {
|
|
|
374
374
|
}
|
|
375
375
|
return tabs
|
|
376
376
|
})
|
|
377
|
+
|
|
378
|
+
const propertyItem = computed<SpaProperty | null>(() => {
|
|
379
|
+
if (item.value?.kind !== 'property') return null
|
|
380
|
+
return item.value.property
|
|
381
|
+
})
|
|
377
382
|
</script>
|
|
378
383
|
|
|
379
384
|
<style scoped>
|