Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create automatic object reference for arrays #30

Open
BigDataKatha opened this issue Nov 5, 2018 · 0 comments
Open

Create automatic object reference for arrays #30

BigDataKatha opened this issue Nov 5, 2018 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@BigDataKatha
Copy link
Contributor

BigDataKatha commented Nov 5, 2018

Issue: the legs object is supposed to be an array.
Objective: Looking for a way to create an automatic object reference that shows legs as an array in the journey object and avoids adding an extra field, i.e. "fields" under the additionalInfo object to accomplish that.

Current legs object:

"legs": {
      "flightNumber": "EM110",
      "route": "SFO>MIA",
      "departureAirport": {
        "name": "Miami International Airport",
        "iataCode": "MIA"
      },
      "departureTime": "2027-03-04T06:35:00-08:00",
      "arrivalAirport": {
        "name": "Miami International Airport",
        "iataCode": "MIA"
      },
      "arrivalTime": "2027-03-04T13:35:00-08:00",
      "estimatedDuration": "PT6H30M",
      "departureCity": {
        "name": "San Francisco",
        "cityCode": "SFO"
      },
      "departureCountry": {
        "name": "United States",
        "isoCode": "US"
      },
      "arrivalCity": {
        "name": "Miami",
        "cityCode": "MIA"
      },
      "arrivalCountry": {
        "name": "United States",
        "isoCode": "US"
      },
      "flightType": "DOMESTIC",
      "operatingAirline": {
        "name": "EveryMundo",
        "iataCode": "EM"
      },
      "aircraft": "Boeing 747"
    },
    "departureCity": {
      "name": "San Francisco",
      "cityCode": "SFO"
    },
    "departureCountry": {
      "name": "United States",
      "isoCode": "US"
    },
    "arrivalCity": {
      "name": "New York",
      "cityCode": "NYC"
    },
    "arrivalCountry": {
      "name": "United States",
      "isoCode": "US"
    },
    "flightType": "DOMESTIC",
    "routeType": "CONNECTING",
    "discount": {
      "isDiscount": true,
      "code": "AFFBFAN",
      "amount": 500,
      "percentage": 0.5,
      "expiration": "2017-12-31"
    },
    "additionalInfo": {
      "fields": [
        {
          "name": "classOfService",
          "value": "COACH_EC"
        }
      ]
    },

Expected legs object:

"legs": [
     {
      "flightNumber": "EM110",
      "route": "SFO>MIA",
      "departureAirport": {
        "name": "Miami International Airport",
        "iataCode": "MIA"
      },
      "departureTime": "2027-03-04T06:35:00-08:00",
      "arrivalAirport": {
        "name": "Miami International Airport",
        "iataCode": "MIA"
      },
      "arrivalTime": "2027-03-04T13:35:00-08:00",
      "estimatedDuration": "PT6H30M",
      "departureCity": {
        "name": "San Francisco",
        "cityCode": "SFO"
      },
      "departureCountry": {
        "name": "United States",
        "isoCode": "US"
      },
      "arrivalCity": {
        "name": "Miami",
        "cityCode": "MIA"
      },
      "arrivalCountry": {
        "name": "United States",
        "isoCode": "US"
      },
      "flightType": "DOMESTIC",
      "operatingAirline": {
        "name": "EveryMundo",
        "iataCode": "EM"
      },
      "aircraft": "Boeing 747"
    },
    "departureCity": {
      "name": "San Francisco",
      "cityCode": "SFO"
    },
    "departureCountry": {
      "name": "United States",
      "isoCode": "US"
    },
    "arrivalCity": {
      "name": "New York",
      "cityCode": "NYC"
    },
    "arrivalCountry": {
      "name": "United States",
      "isoCode": "US"
    },
    "flightType": "DOMESTIC",
    "routeType": "CONNECTING",
    "discount": {
      "isDiscount": true,
      "code": "AFFBFAN",
      "amount": 500,
      "percentage": 0.5,
      "expiration": "2017-12-31"
    },
    "additionalInfo": [
        {
          "name": "classOfService",
          "value": "COACH_EC"
        }
      ]
   }
],

@neilgoldman , do you have an idea on how to achieve this?

@BigDataKatha BigDataKatha added the help wanted Extra attention is needed label Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant