zowe / sample-spring-boot-api-service

Zowe REST API service SDK and sample API service that integrates with Zowe API Mediation Layer
Other
26 stars 18 forks source link

Context Path Required? #65

Closed dkelosky closed 4 years ago

dkelosky commented 4 years ago

In an old instance of the SDK, there was a context path, so endpoints were something like: /sampleservice/api/v1/.... Is the guidance to not have this context path in the URI?

plavjanik commented 4 years ago

The new sample has been recreated from scratch using the https://start.spring.io/ generator and that has not used the context path and the sample has not changed it.

I am not sure what was the reason to use it in the old sample.

I tend to keep the configuration concise and I reused only the code (and config) that was adding some functionality.

What are the pros and cons of having the context path set and not set? It can make sense to keep it consistent with the previous sample. The advantage of not setting it is that you do not need to know it and you can just know the hostname and port to access the homepage (Swagger UI in case of the sample). Example: when I was onboarding Endevor using static YML, I did not know what is the home page. I could not find it in the documentation. Everything that made sense to me ended up with 404. I had to ask several developers of Endevor to be able to issue a REST API request.

dkelosky commented 4 years ago

I like it without context path and really like the concise configuration.

Users of the new SDK have lots of positives but are noticing a few differences. I'll close this for future teams researching about the context path change.

Thank you!