@microtronics/studio-cli 0.39.0 → 0.40.0
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.
- package/CHANGELOG.md +10 -4
- package/out/dde/fileGenerators/api.js +13 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.40.0 (2025-11-11)
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Features
|
|
6
6
|
|
|
7
|
-
* add
|
|
8
|
-
|
|
7
|
+
* add lowercase property mapping for timeseries containers ([24f575e](https://bitbucket.org/microtronics-core/vscode-studio/commits/24f575efa418417c5fd612e55bd17f5fb80972cf))
|
|
8
|
+
|
|
9
|
+
## 0.39.0 (2025-11-10)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add separate schema for single record requests ([a52d269](https://bitbucket.org/microtronics-core/vscode-studio/commits/a52d2692ef2e66dbcf49c4b8154c6a4d28d04b2e))
|
|
14
|
+
* fix response schemas for timeseries ([1b24c1c](https://bitbucket.org/microtronics-core/vscode-studio/commits/1b24c1c3deb867b4ab721b4c498930b2cbbd2526))
|
|
9
15
|
* update test fixtures for dde openapi generation ([9653e18](https://bitbucket.org/microtronics-core/vscode-studio/commits/9653e18477bba138a8906d51bc3118470af092fe))
|
|
10
16
|
|
|
11
17
|
## 0.38.0 (2025-10-23)
|
|
@@ -285,6 +285,7 @@ function generateSchemasFromContainer(apiDescription, containerDefinition, conte
|
|
|
285
285
|
properties: {}
|
|
286
286
|
};
|
|
287
287
|
const requiredProperties = [];
|
|
288
|
+
const isTimeseriesContainer = containerDefinition.containerType === ContainerType.hx;
|
|
288
289
|
for (const field of containerDefinition.fields) {
|
|
289
290
|
if (field.library !== context || field.type === 'shadow') {
|
|
290
291
|
continue;
|
|
@@ -297,7 +298,16 @@ function generateSchemasFromContainer(apiDescription, containerDefinition, conte
|
|
|
297
298
|
}
|
|
298
299
|
schema.required = requiredProperties.length ? requiredProperties : undefined;
|
|
299
300
|
apiDescription.components.schemas[schemaName] = schema;
|
|
300
|
-
|
|
301
|
+
const originalProperties = schema.properties;
|
|
302
|
+
if (isTimeseriesContainer) {
|
|
303
|
+
schema.required = schema.required?.map(name => name.toLowerCase());
|
|
304
|
+
const lowerCaseProperties = {};
|
|
305
|
+
for (const [key, value] of Object.entries(schema.properties)) {
|
|
306
|
+
lowerCaseProperties[key.toLowerCase()] = value;
|
|
307
|
+
}
|
|
308
|
+
schema.properties = lowerCaseProperties;
|
|
309
|
+
}
|
|
310
|
+
if (isTimeseriesContainer) {
|
|
301
311
|
const timerSeriesSelect = {
|
|
302
312
|
type: 'object',
|
|
303
313
|
description: `Request schema of "${containerDefinition.title}"`,
|
|
@@ -308,7 +318,7 @@ function generateSchemasFromContainer(apiDescription, containerDefinition, conte
|
|
|
308
318
|
description: 'Optional selection of specific fields of the given container',
|
|
309
319
|
items: {
|
|
310
320
|
type: 'string',
|
|
311
|
-
enum: Object.keys(
|
|
321
|
+
enum: Object.keys(originalProperties)
|
|
312
322
|
}
|
|
313
323
|
}
|
|
314
324
|
}
|
|
@@ -319,6 +329,7 @@ function generateSchemasFromContainer(apiDescription, containerDefinition, conte
|
|
|
319
329
|
};
|
|
320
330
|
// stamp parameter is always returned if it is a timeseries container
|
|
321
331
|
schema.properties['stamp'] = rapidM2MStampRef;
|
|
332
|
+
requiredProperties.push('stamp');
|
|
322
333
|
}
|
|
323
334
|
}
|
|
324
335
|
function getApiDefinitionForField(field) {
|