2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.sal.rest.doc.impl;
10 import static java.util.Objects.requireNonNull;
12 import javax.ws.rs.core.UriInfo;
13 import org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl.OAversion;
14 import org.opendaylight.netconf.sal.rest.doc.swagger.CommonApiObject;
15 import org.opendaylight.netconf.sal.rest.doc.swagger.SwaggerObject;
17 public class AllModulesDocGenerator {
18 private final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040;
20 public AllModulesDocGenerator(final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040) {
21 this.apiDocGeneratorRFC8040 = requireNonNull(apiDocGeneratorRFC8040);
24 public CommonApiObject getAllModulesDoc(final UriInfo uriInfo, final OAversion oaversion) {
25 final DefinitionNames definitionNames = new DefinitionNames();
26 final SwaggerObject doc = apiDocGeneratorRFC8040.getAllModulesDoc(uriInfo, definitionNames, oaversion);
28 return BaseYangSwaggerGenerator.getAppropriateDoc(doc, oaversion);