Closed maxl2287 closed 1 year ago
As L43 is a reference with the param name, it should match the same name in the request body. We can change any of them as long as they are the same in both places. In the context of this API, URL is probably more specific than URI, as URI may refer to other type of identifiers as well.
Description of the bug
notificationsUri vs notificationsUrl
In https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_definitions/qod-api.yaml#L43 a parameter is called
notificationUrl
. In https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_definitions/qod-api.yaml#L268 it is callednotificationUri
. They should use the same name namenotificationUrl
.Wrong example of notificationsUrl
The example should also just contain the server reference without the
/notifications
-endpoint (see https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_definitions/qod-api.yaml#L271)Why?
The code-generator will generate a class
SessionNotificationsCallbackApi
. Inside of this class it is already defined, that the endpoint/notifications
will be executed. It will look like:apiClient.invokeAPI("/notifications", HttpMethod.POST, Collections.<String, Object>emptyMap(), queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, authNames, returnType);
The ApiClient will use the 'notificationUrl' from the notificationRequest here: https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_code/core/src/main/java/com/camara/qod/service/QodServiceImpl.java#L265 If the notificationUrl of the request will now be "https://application-server.com/notifications" then the application will post a notification against
https://application-server.com/notifications/notifications
This Issue is an updated version of Issue 23.