DGAC/nmb2b-client-js

Fix typings for polymorphic properties

Closed this issue · 0 comments

kouak commented

Some polymorphic properties are deserialized in a way that's not correctly implemented in the typings.

{
  "applicability": {
    "wef": "2023-08-16T11:45:00.000Z",
    "unt": "2023-08-16T13:30:00.000Z"
  },
  "regulationId": "LFSBT16D",
  "reason": "ATC_CAPACITY",
  "location": {
    "referenceLocation-ReferenceLocationAirspace": {
      "type": "AIRSPACE",
      "id": "LFSBBA"
    },
    "id": "LFSBTMA",
    "flightLevels": { "min": [], "max": [] },
    "description": "LFSB ARRIVALS IN BA SECTOR",
    "setIds": { "item": [] }
  },
  "protectedLocation-ReferenceLocationAerodrome": {
    "type": "AERODROME",
    "id": "LFSB"
  }
}

Identified for RegulationOrMCDM.protectedLocation.