mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-18 07:52:59 +03:00
schemas: fcmaterials: Adjust to allow for CAPI-sourced data
* Add new mandatory `data-source` field. * `CarrierName` now optional (not in CAPI data). * `Items` is defined a lot more loosely, due to Journal vs CAPI differences.
This commit is contained in:
parent
f4ab9eb35a
commit
f4b9eab178
@ -33,12 +33,15 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"description" : "Contains all properties from the listed events in the client's journal minus the Localised strings and the properties marked below as 'disallowed'",
|
"description" : "Contains all properties from the listed events in the client's journal minus the Localised strings and the properties marked below as 'disallowed'",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"required" : [ "timestamp", "event", "MarketID", "CarrierName", "CarrierID", "Items" ],
|
"required" : [ "timestamp", "data-source", "event", "MarketID", "CarrierID", "Items" ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"timestamp": {
|
"timestamp": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"format" : "date-time"
|
"format" : "date-time"
|
||||||
},
|
},
|
||||||
|
"data-source": {
|
||||||
|
"enum" : [ "Journal", "CAPI", "CAPI-Journal" ]
|
||||||
|
},
|
||||||
"event" : {
|
"event" : {
|
||||||
"enum" : [ "FCMaterials" ]
|
"enum" : [ "FCMaterials" ]
|
||||||
},
|
},
|
||||||
@ -66,28 +69,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Items": {
|
"Items": {
|
||||||
"type" : "array",
|
"type" : [ "array", "object" ],
|
||||||
"required" : [ "id", "Name", "Price", "Stock", "Demand" ],
|
|
||||||
"properties" : {
|
|
||||||
"id" : {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"Name": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"Price": {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"Stock": {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"Demand": {
|
|
||||||
"type" : "integer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"_Localised$" : { "$ref" : "#/definitions/disallowed" }
|
"_Localised$" : { "$ref" : "#/definitions/disallowed" },
|
||||||
|
"locName" : { "$ref" : "#/definitions/disallowed" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user