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

OHFJIRA-52 list of exposed webservices #52

Merged
merged 1 commit into from
May 15, 2017

Conversation

kkovarik
Copy link
Collaborator

ABOUT

Overview of exposed Webservices. See related JIRA task for more info: https://openhubframework.atlassian.net/browse/OHFJIRA-52

CHANGES

  • added new REST endpoint GET /api/ws with simple test. It does reuse WsdlRegistry functionality.

@kkovarik kkovarik added this to the v2.0 milestone May 13, 2017
@kkovarik kkovarik self-assigned this May 13, 2017
@kkovarik kkovarik requested review from hanusto and pjuza May 13, 2017 23:42
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 55.953% when pulling fa7bcc0 on feature/OHFJIRA-52-ws-overview into f0f307c on develop.

Copy link
Contributor

@pjuza pjuza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there API documentation in Apiary? Also mockup diagram for GUI developers in Balsamiq would be nice.

*/
@RestController
@RequestMapping(value = WsController.REST_URI)
public class WsController extends AbstractOhfController {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe WsdlController would be better ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And where to expose it, directly under /api/wsdl?

No problem with that, I do not have any strict opinion on this, my initial thinking was like - ok, what is wsdl? definition of service, resource itself desired by consumer is the webservice.

* @author Karel Kovarik
*/
@XmlRootElement
public class WsInfoRpc {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as controller - wouldn't be better to use "wsdl" prefix, isn't it more descriptive?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, as in previous comment, if it is the wsdl resource this endpoint should list, then yes, I will change it...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's overview of input web service definitions (wsdl).
We will add overview of REST services in the next version ...

@kkovarik
Copy link
Collaborator Author

I apologize, the links to drafts of mockup and API documentation were mentioned only in the JIRA task:

Api draft: http://docs.openhubframework.apiary.io/#reference/0/openhub-web-services/gets-list-of-exposed-webservices
Mockup draft: https://openwise.mybalsamiq.com/projects/openhub/WS%20overview

@pjuza
Copy link
Contributor

pjuza commented May 14, 2017

Please change URI: /api/ws -> /web/admin/api/ws

If you accept change from ws to wsdl then please change also names in API.

Copy link
Collaborator

@hanusto hanusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to rename WS -> WSDL and whole endpoint should be in /api/services context. After that I agree with that.

/**
* Base REST uri for the controller.
*/
public static final String REST_URI = BASE_PATH + "/ws";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And WSDL for endpoint URL too. Maybe my recommendation is /api/services/wsdl

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/**
* Uri part on which wsdl is exposed.
*/
private static final String WS_URI = "/ws/";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if the WS context can be configured or not. If yes, this should be the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot, however changed it to the constant used to actually configure the context (RouteConstants.WS_URI_PREFIX).

* @param request the input httpServletRequest.
* @return list of WsInfoRpc domain objects.
*/
@GetMapping(produces = {"application/xml", "application/json"})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

@kkovarik kkovarik force-pushed the feature/OHFJIRA-52-ws-overview branch 2 times, most recently from e18f4aa to a0e839a Compare May 14, 2017 21:58
@kkovarik
Copy link
Collaborator Author

Thanks for the review, updated endpoint to /api/services/wsdl and refactored to WsdlController & WsdlInfoRpc etc. feel free to check again.

API documentation updated: http://docs.openhubframework.apiary.io/#reference/0/openhub-web-services, now I am using collection wrapping as it is introduced in PR#53: #53

Will wait until PR#53 is merged, then rebase this branch to use the common CollectionWrapper as well...

@kkovarik kkovarik added task and removed improvement labels May 14, 2017
@kkovarik kkovarik force-pushed the feature/OHFJIRA-52-ws-overview branch from a0e839a to ee61348 Compare May 14, 2017 22:05
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 55.89% when pulling ee61348 on feature/OHFJIRA-52-ws-overview into f0f307c on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 55.89% when pulling ee61348 on feature/OHFJIRA-52-ws-overview into f0f307c on develop.

/**
* Get list of exposed web services.
* @param request the input httpServletRequest.
* @return list of WsInfoRpc domain objects wrapped in CollectionWrapper.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WsInfoRpc -> WsdlInfoRpc, or use {@link WsInfoRpc}. This was refactored automatically. The same for {@link CollectionWrapper}.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, missed that, fixed.

Copy link
Collaborator

@hanusto hanusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it is perfect. Only one improvement introduced -> javadoc. PR #53 merged so you can rebase it with requested changes.

@hanusto
Copy link
Collaborator

hanusto commented May 15, 2017

PR #53 is merged, so you can rebase that.

@kkovarik kkovarik force-pushed the feature/OHFJIRA-52-ws-overview branch from ee61348 to 0c0759e Compare May 15, 2017 18:57
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 56.315% when pulling 0c0759e on feature/OHFJIRA-52-ws-overview into 37fe88e on develop.

@kkovarik
Copy link
Collaborator Author

@hanusto thanks for fast merge, rebased on current develop.

@hanusto hanusto merged commit 40a8e64 into develop May 15, 2017
@hanusto hanusto deleted the feature/OHFJIRA-52-ws-overview branch May 15, 2017 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants