Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-11878

Some REST resources return a Content-Type that does not match the documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.7, 4.9.0
    • Fix Version/s: None
    • Component/s: REST API
    • Labels:
      None

      Description

      Some REST resources return a Content-Type that does not match the documentation.

      For example, according to the documentation, this REST call should return application/vnd.org.jfrog.artifactory.security.PermissionTargets+json but instead the Content-Type is application/vnd.org.jfrog.artifactory.security.Users+json. Performing an OPTIONS call on that resource shows that it may return various Content-Types, including both of the aforementioned types:

                      <response>
                          <representation mediaType="application/vnd.org.jfrog.artifactory.security.Users+json"/>
                          <representation mediaType="application/vnd.org.jfrog.artifactory.security.Groups+json"/>
                          <representation mediaType="application/vnd.org.jfrog.artifactory.security.PermissionTargets+json"/>
                          <representation mediaType="application/json"/>
                      </response>
      

      In fact, if the user provides the header "Accept: application/vnd.org.jfrog.artifactory.security.PermissionTargets+json", the correct Content-Type will be returned. Still the call should default to the correct Content-Type or the documentation should be updated for accuracy.

      Affected resources:

      api/security/permissions
      api/security/groups

      Kriheli:
      What needs to be fixed:

      1) api/security/permissions - need to produce application/vnd.org.jfrog.artifactory.security.PermissionTargets+json and NOT application/vnd.org.jfrog.artifactory.security.Users+json
      2) api/security/groups - need to produce application/vnd.org.jfrog.artifactory.security.Groups+json and NOT application/vnd.org.jfrog.artifactory.security.Users+json
      Moving to RnD to fix.
      Important: Once fixed, need to update the documentation again to reflect the fix in the API.

        Attachments

          Activity

            People

            Assignee:
            gidis Gidi Shabat
            Reporter:
            arturoa Arturo Aparicio
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: