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

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

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      1.0-beta-1, 1.0-b05/b-06

      Description

      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'] }
      ]
      

        Attachments

          Issue Links

            Activity

            Hide
            cliffmeyers Cliff Meyers added a comment -

            Pulling this forward because in order to fix JENKINS-37831 we need more capabilities logic, and we need to handle this more cleanly.

            Show
            cliffmeyers Cliff Meyers added a comment - Pulling this forward because in order to fix JENKINS-37831 we need more capabilities logic, and we need to handle this more cleanly.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: