* <a href="https://helloreverb.com/developers/swagger"
* >https://helloreverb.com/developers/swagger</a>) compliant documentation for
* RESTCONF APIs. The output of this is used by embedded Swagger UI.
- *
- * <p>
- * NOTE: These API's need to be synchronized due to bug 1198. Thread access to
- * the SchemaContext is not synchronized properly and thus you can end up with
- * missing definitions without this synchronization. There are likely otherways
- * to work around this limitation, but given that this API is a dev only tool
- * and not dependent UI, this was the fastest work around.
*/
@Component
@Singleton
}
@Override
- public synchronized Response getAllModulesDoc(final UriInfo uriInfo) {
+ public Response getAllModulesDoc(final UriInfo uriInfo) {
final DefinitionNames definitionNames = new DefinitionNames();
final OpenApiObject doc = openApiGeneratorRFC8040.getControllerModulesDoc(uriInfo, definitionNames);
return Response.ok(doc).build();
* Generates Swagger compliant document listing APIs for module.
*/
@Override
- public synchronized Response getDocByModule(final String module, final String revision, final UriInfo uriInfo) {
+ public Response getDocByModule(final String module, final String revision, final UriInfo uriInfo) {
return Response.ok(
openApiGeneratorRFC8040.getApiDeclaration(module, revision, uriInfo))
.build();
* Redirects to embedded swagger ui.
*/
@Override
- public synchronized Response getApiExplorer(final UriInfo uriInfo) {
+ public Response getApiExplorer(final UriInfo uriInfo) {
return Response.seeOther(uriInfo.getBaseUriBuilder().path("../explorer/index.html").build()).build();
}
@Override
- public synchronized Response getListOfMounts(final UriInfo uriInfo) {
+ public Response getListOfMounts(final UriInfo uriInfo) {
final List<MountPointInstance> entity = mountPointOpenApiRFC8040
.getInstanceIdentifiers().entrySet().stream()
.map(entry -> new MountPointInstance(entry.getKey(), entry.getValue()))
}
@Override
- public synchronized Response getMountDocByModule(final String instanceNum, final String module,
+ public Response getMountDocByModule(final String instanceNum, final String module,
final String revision, final UriInfo uriInfo) {
final OpenApiObject api = mountPointOpenApiRFC8040.getMountPointApi(uriInfo, Long.parseLong(instanceNum),
module, revision);
}
@Override
- public synchronized Response getMountDoc(final String instanceNum, final UriInfo uriInfo) {
+ public Response getMountDoc(final String instanceNum, final UriInfo uriInfo) {
final String stringPageNum = uriInfo.getQueryParameters().getFirst(PAGE_NUM);
final OpenApiObject api = mountPointOpenApiRFC8040.getMountPointApi(uriInfo,
Long.parseLong(instanceNum), stringPageNum);