Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37519

Enhance "fetch" library to augment REST API responses with "Capabilities" metadata

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • 1.0-beta-1, 1.0-b05/b-06

      The "fetch" library should allow for Capabilities metadata to be fetched after a standard REST API call is made, so a unified view of the data can be returned to the UI component layer.

      Need to design a configuration that can be passed to fetch to indicate which graph paths in the response should be used for fetching capabilities.

      e.g. for the following response

      [
          { name: 'pipeline', _class: 'io.jenkins.blueocean.rest.model.PipelineImpl' },
          { name: 'freestyle', _class: 'io.jenkins.blueocean.rest.model.AbstractPipelineImpl }
      ]
      

      we need a way to express that the top-level "_class" property should be fetched. Perhaps GraphQL can be used as an inspiration for this if not outright implementation.

      The augmented response would look like:

      [
          { name: 'pipeline', _class: 'io.jenkins.blueocean.rest.model.PipelineImpl', _capabilities: ['foo.bar.Thing'] },
          { name: 'freestyle', _class: 'io.jenkins.blueocean.rest.model.AbstractPipelineImpl, _capabilities: ['foo.bar.OtherThing'] }
      ]
      

            cliffmeyers Cliff Meyers
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: