Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rest): Fix response api for vendor #2133

Closed

Conversation

tuannn2
Copy link
Contributor

@tuannn2 tuannn2 commented Oct 4, 2023

Issue:

  • Currently, Response Vendor of Release, Component is array:
          "sw360:vendors": [
            {
                "url": "http://testvendor.com",
                "shortName": "TV",
                "fullName": "Vendor",
            }
        ]

Expected: Response Vendor of Release, Component is an Object:

        "sw360:vendor" : {
            "url" : "http://testvendor.com",
            "shortName" : "Vendor",
            "fullName" : "Test Vendor"
        }

How To Test?

Execute command call API:

$ curl 'https://sw360.org/api/releases/3765276512' -i -X GET \
    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsic3czNjAtUkVTVC1BUEkiXSwidXNlcl9uYW1lIjoiYWRtaW5Ac3czNjAub3JnIiwic2NvcGUiOlsiYWxsIl0sImV4cCI6MTY5NjQxMTUyMywiYXV0aG9yaXRpZXMiOlsiUkVBRCIsIldSSVRFIl0sImp0aSI6IjJUQ0dXMXdJNmNKb2xmNlR4d2lfTlEwR3NoWSIsImNsaWVudF9pZCI6InRydXN0ZWQtc3czNjAtY2xpZW50In0.LbrfvFrAGxpcmP7Mfrp1yfpwAoC9kl_VIn54plmP5Vvc80RR-d-l1ac8cAqvWtB3ku9SdSXz3FI5d0dCaJAsPBKQ5ahmPYeQIs7xoPs0_ZZQTeJSYWKvxRhn2zfpfP2onhcwmP4--UpjpKF1mtGGurL5sE2kq1W6EJxlHH4NSxn06L-iDBQJ5Z7m9DwoM0OoK3aORJ1S7VuwkQ0wKE28jACEqdmC0eA6oVjbue8sKdS-tIkxIkKxdkhlVJOuVRaDTcxH5Nr70Tw6y_MePHh8_QRZIVJgcYJ9dDi2yE5U1raLQSuRokbkX0QJonY2nSh_7Wdctb2o_JWSlLKNgrgazQ' \
    -H 'Accept: application/hal+json'

Checklist

Must:

  • All related issues are referenced in commit messages and in PR

@ag4ums
Copy link
Contributor

ag4ums commented Oct 5, 2023

@tuannn2, is this change necessary? as this will break the existing rest client,

@tuannn2
Copy link
Contributor Author

tuannn2 commented Oct 6, 2023

@tuannn2, is this change necessary? as this will break the existing rest client,

I just want to make sure the supplier's response represents the object as designed.
If there are rest client using it, there is no need to change it.

@ag4ums
Copy link
Contributor

ag4ums commented Nov 29, 2023

Closing this PR as it changes the endpoint output.. may be we have these correction in the next endpoint version (v2)

@ag4ums ag4ums closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants