-
Notifications
You must be signed in to change notification settings - Fork 127
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
Ability to generate docs to path other than /jsondoc/ #209
Comments
AFAICT this is a limitation of spring. |
According to this stackoverflow answer, it seems that it could be configurable via properties. |
@joffrey-bion : It could be made configurable, but currently it is not. This can be changed by doing the following: @Controller
public class CustomJSONDocController extends JSONDocController {
public final static String JSONDOC_CUSTOM_PATH = "/apidoc"; // <-- Your path here
public CustomJSONDocController(String version, String basePath, List<String> packages) {
super(version, basePath, packages);
}
@Override
@RequestMapping(value = JSONDOC_CUSTOM_PATH, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody JSONDoc getApi() {
return super.getAPI();
}
} Just make sure you don't have the other class on your component scanning path / declared as bean. |
@ST-DDT Yes, I meant it could be made configurable. My comment's goal was to provide an idea as to how to implement this feature. That being said, I'm not sure it would be worth adding configurability in this respect. I feel like the |
JSONDoc is serving up the documentation at the endpoint /jsondoc/jsondoc-ui.html
I would like to map it somewhere else e.g. /lowerlevel/jsondoc/jsondoc-ui.html
And when I look at the code in GitHub I think this is coming from line 26 of JSONDocController
public final static String JSONDOC_DEFAULT_PATH = "/jsondoc";
It would be great if we could have a way to override the JSONDOC_DEFAULT_PATH
The text was updated successfully, but these errors were encountered: