Skip to content

Commit 2715471

Browse files
fix(schema): resolve linting issues in abc-inventory-module-data-2.0.0 (SchemaStore#4947)
* fix(linting): resolve linting issues in abc-inventory-module-data-2.0.0.json schema Signed-off-by: karan-palan <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: karan-palan <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2fc3a1c commit 2715471

File tree

1 file changed

+45
-38
lines changed

1 file changed

+45
-38
lines changed

src/schemas/json/abc-inventory-module-data-2.0.0.json

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"type": "object",
77
"definitions": {
88
"ABCStatus": {
9-
"type": "string",
109
"enum": [
1110
"RELEASED",
1211
"CONDITIONAL_RELEASED",
@@ -26,8 +25,7 @@
2625
"type": "number"
2726
},
2827
"transactionType": {
29-
"type": "string",
30-
"enum": ["receive"]
28+
"const": "receive"
3129
},
3230
"transactionData": {
3331
"type": "object",
@@ -102,8 +100,7 @@
102100
"type": "number"
103101
},
104102
"transactionType": {
105-
"type": "string",
106-
"enum": ["build"]
103+
"const": "build"
107104
},
108105
"transactionData": {
109106
"type": "object",
@@ -237,8 +234,7 @@
237234
"type": "number"
238235
},
239236
"transactionType": {
240-
"type": "string",
241-
"enum": ["transfer"]
237+
"const": "transfer"
242238
},
243239
"transactionData": {
244240
"type": "object",
@@ -303,8 +299,7 @@
303299
"type": "number"
304300
},
305301
"transactionType": {
306-
"type": "string",
307-
"enum": ["statusChange"]
302+
"const": "statusChange"
308303
},
309304
"transactionData": {
310305
"type": "object",
@@ -369,8 +364,7 @@
369364
"type": "number"
370365
},
371366
"transactionType": {
372-
"type": "string",
373-
"enum": ["distribute"]
367+
"const": "distribute"
374368
},
375369
"transactionData": {
376370
"type": "object",
@@ -422,8 +416,7 @@
422416
"type": "number"
423417
},
424418
"transactionType": {
425-
"type": "string",
426-
"enum": ["destroy"]
419+
"const": "destroy"
427420
},
428421
"transactionData": {
429422
"type": "object",
@@ -471,8 +464,7 @@
471464
"type": "number"
472465
},
473466
"transactionType": {
474-
"type": "string",
475-
"enum": ["sell"]
467+
"const": "sell"
476468
},
477469
"transactionData": {
478470
"type": "object",
@@ -524,8 +516,7 @@
524516
"type": "number"
525517
},
526518
"transactionType": {
527-
"type": "string",
528-
"enum": ["adjust"]
519+
"const": "adjust"
529520
},
530521
"transactionData": {
531522
"type": "object",
@@ -581,8 +572,7 @@
581572
"type": "number"
582573
},
583574
"transactionType": {
584-
"type": "string",
585-
"enum": ["changeExpiry"]
575+
"const": "changeExpiry"
586576
},
587577
"transactionData": {
588578
"type": "object",
@@ -626,15 +616,33 @@
626616
},
627617
"ABCInventoryTransaction": {
628618
"oneOf": [
629-
{ "$ref": "#/definitions/ABCInventoryReceiveTransaction" },
630-
{ "$ref": "#/definitions/ABCInventoryBuildTransaction" },
631-
{ "$ref": "#/definitions/ABCInventoryTransferTransaction" },
632-
{ "$ref": "#/definitions/ABCInventoryStatusChangeTransaction" },
633-
{ "$ref": "#/definitions/ABCInventoryDistributeTransaction" },
634-
{ "$ref": "#/definitions/ABCInventoryDestroyTransaction" },
635-
{ "$ref": "#/definitions/ABCInventorySellTransaction" },
636-
{ "$ref": "#/definitions/ABCInventoryAdjustTransaction" },
637-
{ "$ref": "#/definitions/ABCInventoryChangeExpiryTransaction" }
619+
{
620+
"$ref": "#/definitions/ABCInventoryReceiveTransaction"
621+
},
622+
{
623+
"$ref": "#/definitions/ABCInventoryBuildTransaction"
624+
},
625+
{
626+
"$ref": "#/definitions/ABCInventoryTransferTransaction"
627+
},
628+
{
629+
"$ref": "#/definitions/ABCInventoryStatusChangeTransaction"
630+
},
631+
{
632+
"$ref": "#/definitions/ABCInventoryDistributeTransaction"
633+
},
634+
{
635+
"$ref": "#/definitions/ABCInventoryDestroyTransaction"
636+
},
637+
{
638+
"$ref": "#/definitions/ABCInventorySellTransaction"
639+
},
640+
{
641+
"$ref": "#/definitions/ABCInventoryAdjustTransaction"
642+
},
643+
{
644+
"$ref": "#/definitions/ABCInventoryChangeExpiryTransaction"
645+
}
638646
]
639647
},
640648
"ABCInventoryEntryWithoutUpstreams": {
@@ -670,8 +678,7 @@
670678
"type": "string"
671679
},
672680
"hasUpstreams": {
673-
"type": "boolean",
674-
"enum": [false]
681+
"const": false
675682
},
676683
"transactionNotes": {
677684
"type": "array",
@@ -732,8 +739,7 @@
732739
"type": "string"
733740
},
734741
"hasUpstreams": {
735-
"type": "boolean",
736-
"enum": [true]
742+
"const": true
737743
},
738744
"upstreamIDs": {
739745
"type": "array",
@@ -784,18 +790,19 @@
784790
},
785791
"ABCInventoryEntry": {
786792
"oneOf": [
787-
{ "$ref": "#/definitions/ABCInventoryEntryWithoutUpstreams" },
788-
{ "$ref": "#/definitions/ABCInventoryEntryWithUpstreams" }
793+
{
794+
"$ref": "#/definitions/ABCInventoryEntryWithoutUpstreams"
795+
},
796+
{
797+
"$ref": "#/definitions/ABCInventoryEntryWithUpstreams"
798+
}
789799
]
790800
}
791801
},
792802
"properties": {
793803
"$schema": {
794804
"description": "Link to https://www.schemastore.org/abc-inventory-module-data-2.0.0.json",
795-
"type": "string",
796-
"enum": [
797-
"https://www.schemastore.org/abc-inventory-module-data-2.0.0.json"
798-
]
805+
"const": "https://www.schemastore.org/abc-inventory-module-data-2.0.0.json"
799806
},
800807
"ABCProducts": {
801808
"type": "object",

0 commit comments

Comments
 (0)