mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-17 23:51:30 +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",
|
||||
"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,
|
||||
"required" : [ "timestamp", "event", "MarketID", "CarrierName", "CarrierID", "Items" ],
|
||||
"required" : [ "timestamp", "data-source", "event", "MarketID", "CarrierID", "Items" ],
|
||||
"properties" : {
|
||||
"timestamp": {
|
||||
"type" : "string",
|
||||
"format" : "date-time"
|
||||
},
|
||||
"data-source": {
|
||||
"enum" : [ "Journal", "CAPI", "CAPI-Journal" ]
|
||||
},
|
||||
"event" : {
|
||||
"enum" : [ "FCMaterials" ]
|
||||
},
|
||||
@ -66,28 +69,10 @@
|
||||
},
|
||||
|
||||
"Items": {
|
||||
"type" : "array",
|
||||
"required" : [ "id", "Name", "Price", "Stock", "Demand" ],
|
||||
"properties" : {
|
||||
"id" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"Name": {
|
||||
"type" : "string",
|
||||
"minLength" : 1
|
||||
},
|
||||
"Price": {
|
||||
"type" : "integer"
|
||||
},
|
||||
"Stock": {
|
||||
"type" : "integer"
|
||||
},
|
||||
"Demand": {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"type" : [ "array", "object" ],
|
||||
"patternProperties": {
|
||||
"_Localised$" : { "$ref" : "#/definitions/disallowed" }
|
||||
"_Localised$" : { "$ref" : "#/definitions/disallowed" },
|
||||
"locName" : { "$ref" : "#/definitions/disallowed" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user