Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-479

Remove @definitionName attributes from generated JSON Schema

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • 0.21.0
    • None
    • None
    • None
    • All
    • Hide

      all redundant definition name have been removed from the rest API and the @defitinionName has been kept for making sure we can deserialize the data when there are mutilple properties in the payload.

      Show
      all redundant definition name have been removed from the rest API and the @defitinionName has been kept for making sure we can deserialize the data when there are mutilple properties in the payload.
    • GreenHopper Ranking:
      0|i0yqw3:
    • 9223372036854775807
    • Small

    Description

      The component REST service uses an attribute called @definitionName to link sub-properties to properties (in a simplified JSON format described by a JSON Schema).

      For example, to call `getSample` on a SimpleFileIODataset:

      call: http://localhost:8989/tcomp/runtimes/SimpleFileIoDataset/data

      body:

      {
          "properties": {
              "format": "CSV",
              "path": "file:///tmp/stuff.csv",
              "@definitionName": "SimpleFileIoDataset"
          },
          "dependencies": [{
              "@definitionName": "SimpleFileIoDatastore",
              "useKerberos": false
          }]
      }
      

      The @definitionName is redundant in the first properties (since it is already in the URL call) and fragile in the dependencies (since any value other than the name of the datastore will cause a failure).

      This instance data should use the name in the REST endpoint and the properties name (not the definition name) to attach subproperties:

      {
          "properties": {
              "format": "CSV",
              "path": "file:///tmp/stuff.csv"
          },
          "dependencies": {
              "datastore" : {
                  "useKerberos": false
              }
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rskraba Ryan Skraba
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: