Skip to content

Commit 447e517

Browse files
authored
fix: always generate from latest (#326)
* generate fetches openrpc from QCS * generate from latest specs
1 parent cbbd2c3 commit 447e517

File tree

4 files changed

+28
-19
lines changed

4 files changed

+28
-19
lines changed

api-spec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14392,7 +14392,7 @@
1439214392
}
1439314393
},
1439414394
"NxDimension": {
14395-
"description": "Either qDef or qLibraryId must be set, but not both.\nIf the dimension is set in the hypercube and not in the library, this dimension cannot be shared with other objects.\nA dimension that is set in the library can be used by many objects.",
14395+
"description": "The fields or expressions in the dimension are either defined in qDef or in the master dimension referred to by qLibraryId. If qLibraryId is set then the qFieldDefs, qFieldLabels, qGrouping, qLabelExpression and qAlias of the master dimension will be used.\nIf the dimension is set in the hypercube and not in the library, this dimension cannot be shared with other objects.\nA dimension that is set in the library can be used by many objects.",
1439614396
"type": "struct",
1439714397
"entries": {
1439814398
"AttributeDimensions": {
@@ -15129,7 +15129,7 @@
1512915129
}
1513015130
},
1513115131
"NxMeasure": {
15132-
"description": "Either qDef or qLibraryId must be set, but not both.\nIf the measure is set in the hypercube and not in the library, this measure cannot be shared with other objects.\nA measure that is set in the library can be used by many objects.\n\nexpressions are complementary expressions associated to a measure. For example, you can decide to change the background color of a visualization depending on the values of the measure.\nAttribute expressions do not affect the layout of an object. The sorting order is unchanged.",
15132+
"description": "Either qDef or qLibraryId must be set, but not both. If both are set, the library measure's qDef and qLabel will be used.\nIf the measure is set in the hypercube and not in the library, this measure cannot be shared with other objects.\nA measure that is set in the library can be used by many objects.\n\nexpressions are complementary expressions associated to a measure. For example, you can decide to change the background color of a visualization depending on the values of the measure.\nAttribute expressions do not affect the layout of an object. The sorting order is unchanged.",
1513315133
"type": "struct",
1513415134
"entries": {
1513515135
"AttributeDimensions": {

qix_generated.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/engine-rpc.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openrpc": "1.0.0",
33
"info": {
44
"title": "QIX",
5-
"version": "12.2064.0",
5+
"version": "12.2073.0",
66
"description": "The JSON-RPC API over websocket that enables you to interact with the Qlik Associative Engine."
77
},
88
"methods": [
@@ -15965,7 +15965,7 @@
1596515965
},
1596615966
"NxDimension": {
1596715967
"type": "object",
15968-
"description": "<div class=note>Either **qDef** or **qLibraryId** must be set, but not both. </div> <div class=note>If the dimension is set in the hypercube and not in the library, this dimension cannot be shared with other objects.</div> <div class=note>A dimension that is set in the library can be used by many objects.</div>",
15968+
"description": "<div class=note>The fields or expressions in the dimension are either defined in **qDef** or in the master dimension referred to by **qLibraryId**. If **qLibraryId** is set then the qFieldDefs, qFieldLabels, qGrouping, qLabelExpression and qAlias of the master dimension will be used. </div> <div class=note>If the dimension is set in the hypercube and not in the library, this dimension cannot be shared with other objects.</div> <div class=note>A dimension that is set in the library can be used by many objects.</div>",
1596915969
"properties": {
1597015970
"qLibraryId": {
1597115971
"type": "string",
@@ -16358,7 +16358,7 @@
1635816358
},
1635916359
"NxMeasure": {
1636016360
"type": "object",
16361-
"description": "<div class=note>Either **qDef** or **qLibraryId** must be set, but not both. </div> <div class=note>If the measure is set in the hypercube and not in the library, this measure cannot be shared with other objects.</div> <div class=note>A measure that is set in the library can be used by many objects.</div> <div class=note>\nexpressions are complementary expressions associated to a measure. For example, you can decide to change the background color of a visualization depending on the values of the measure.\nAttribute expressions do not affect the layout of an object. The sorting order is unchanged.\n</div>",
16361+
"description": "<div class=note>Either **qDef** or **qLibraryId** must be set, but not both. If both are set, the library measure's qDef and qLabel will be used. </div> <div class=note>If the measure is set in the hypercube and not in the library, this measure cannot be shared with other objects.</div> <div class=note>A measure that is set in the library can be used by many objects.</div> <div class=note>\nexpressions are complementary expressions associated to a measure. For example, you can decide to change the background color of a visualization depending on the values of the measure.\nAttribute expressions do not affect the layout of an object. The sorting order is unchanged.\n</div>",
1636216362
"properties": {
1636316363
"qLibraryId": {
1636416364
"type": "string",
@@ -24408,8 +24408,5 @@
2440824408
}
2440924409
},
2441024410
"x-qlik-visibility": "public",
24411-
"x-qlik-stability": "locked",
24412-
"x-qlik-categories": [
24413-
"external/manage"
24414-
]
24415-
}
24411+
"x-qlik-stability": "locked"
24412+
}

schema/generate.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22

33
## compares engine spec with master
44

5-
wget -q https://qlik.dev/specs/json-rpc/qix.json -O ./schema/engine-rpc.json
6-
git diff --exit-code origin/master -- ./schema/engine-rpc.json >/dev/null
7-
if [[ $? -ne 0 ]]; then
5+
generate() {
6+
if [[ $QCS_HOST == "" ]]; then
7+
echo "QCS_HOST not set"
8+
return 1
9+
fi
10+
if [[ $QCS_API_KEY == "" ]]; then
11+
echo "QCS_API_KEY not set"
12+
return 1
13+
fi
14+
curl -s -H "Authorization: Bearer $QCS_API_KEY" https://$QCS_HOST/api/engine/openrpc | jq > ./schema/engine-rpc.json
15+
git diff --exit-code origin/master -- ./schema/engine-rpc.json >/dev/null
16+
if [[ $? -ne 0 ]]; then
817
ENGINE_VERSION=$(cat ./schema/engine-rpc.json | jq -r '.info.version')
918
echo "Generating enigma-go based on OPEN-RPC API for Qlik Associative Engine version $ENGINE_VERSION"
1019
## generate code
@@ -13,6 +22,9 @@ if [[ $? -ne 0 ]]; then
1322
go fmt ./qix_generated.go >/dev/null
1423
## generate spec
1524
go run ./spec/generate.go
16-
else
25+
else
1726
echo "No changes to engine-rpc.json, nothing to do."
18-
fi
27+
fi
28+
}
29+
30+
generate

0 commit comments

Comments
 (0)