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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

            Assignee:
            Cliff Meyers
            Reporter:
            Cliff Meyers
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: