Convert apidocs to new web API
[netconf.git] / restconf / sal-rest-docgen / src / main / java / org / opendaylight / netconf / sal / rest / doc / impl / MountPointSwaggerGeneratorRFC8040.java
1 /*
2  * Copyright (c) 2018 Inocybe Technologies and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netconf.sal.rest.doc.impl;
9
10 import java.util.Objects;
11 import java.util.Optional;
12 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
13 import org.opendaylight.controller.sal.core.api.model.SchemaService;
14 import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
15
16 /**
17  * MountPoint generator implementation for RFC 8040.
18  *
19  * @author Thomas Pantelis
20  */
21 public class MountPointSwaggerGeneratorRFC8040 extends BaseYangSwaggerGeneratorRFC8040 implements AutoCloseable {
22     private final MountPointSwagger mountPointSwagger;
23
24     public MountPointSwaggerGeneratorRFC8040(SchemaService schemaService, DOMMountPointService mountService) {
25         super(Optional.of(Objects.requireNonNull(schemaService)));
26         mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
27         mountPointSwagger.init();
28     }
29
30     public MountPointSwagger getMountPointSwagger() {
31         return mountPointSwagger;
32     }
33
34     @Override
35     public void close() {
36         mountPointSwagger.close();
37     }
38 }