wso2 / ballerina-vscode

To keep Ballerina VSCode plugin related issues, discussions, etc.
Apache License 2.0
42 stars 20 forks source link

Record configuration 'Import JSON' not working #177

Closed himasha closed 2 years ago

himasha commented 2 years ago

Description:

  1. Create a new record configuration and a sample JSON payload through 'Import JSON' option.
  2. Unable to save the payload as it is stuck at loading as below image

Steps to reproduce: Sample JSON

{
  "created_at": "2012-03-13T16:09:54-04:00",
  "id": 255858046,
  "line_items": [
    {
      "id": 466157049,
      "sku": "IPOD2008GREEN",
      "name": "IPod Nano - 8gb - green",
      "grams": 200,
      "price": "199.00",
      "title": "IPod Nano - 8gb",
      "duties": [
        {
          "id": "2",
          "tax_lines": [
            {
              "rate": 0.1,
              "price": "16.486",
              "title": "VAT",
              "price_set": {
                "shop_money": {
                  "amount": "16.486",
                  "currency_code": "CAD"
                },
                "presentment_money": {
                  "amount": "10.531",
                  "currency_code": "EUR"
                }
              }
            }
          ],
          "shop_money": {
            "amount": "164.86",
            "currency_code": "CAD"
          },
          "presentment_money": {
            "amount": "105.31",
            "currency_code": "EUR"
          },
          "admin_graphql_api_id": "gid://shopify/Duty/2",
          "country_code_of_origin": "CA",
          "harmonized_system_code": "520300"
        }
      ],
      "vendor": null,
      "taxable": true,
      "quantity": 1,
      "gift_card": false,
      "tax_lines": [],
      "product_id": 632910392,
      "properties": [],
      "variant_id": 39072856,
      "variant_title": "green",
      "product_exists": true,
      "total_discount": "0.00",
      "requires_shipping": true,
      "fulfillment_status": null,
      "fulfillment_service": "manual",
      "fulfillable_quantity": 1,
      "fulfillment_line_item_id": 274098237,
      "variant_inventory_management": "shopify"
    }
  ],
  "location_id": 40642626,
  "name": "#1001.1",
  "notify_customer": true,
  "order_id": 450789469,
  "origin_address": [
    {
      "zip": "G1R 4P5",
      "city": "Montreal",
      "address1": "1 Rue des Carrieres",
      "address2": "Suite 1234",
      "country_code": "CA",
      "province_code": "QC"
    }
  ],
  "receipt": {
    "testcase": true,
    "authorization": "123456"
  },
  "service": "manual",
  "shipment_status": "confirmed",
  "status": "failure",
  "tracking_company": "China Post",
  "tracking_numbers": [
    "112345Z2345"
  ],
  "tracking_urls": [
    "http://track-chinapost.com/startairmail.php?code=112345Z2345"
  ],
  "updated_at": "2012-05-01T14:22:25-04:00",
  "variant_inventory_management": "shopify"
}

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

prabushi commented 2 years ago

The fix is available in Ballerina 2201.0.3 release.