Change artifactId in sal-rest-docgen
[netconf.git] / restconf / restconf-openapi / src / main / java / org / opendaylight / netconf / sal / rest / doc / jaxrs / OpenApiApplication.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. 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.jaxrs;
9
10 import static java.util.Objects.requireNonNull;
11
12 import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
13 import java.util.Set;
14 import javax.ws.rs.core.Application;
15 import org.opendaylight.netconf.sal.rest.doc.api.OpenApiService;
16
17 // FIXME: hide this class
18 public final class OpenApiApplication extends Application {
19     private final OpenApiService openApiService;
20
21     public OpenApiApplication(final OpenApiService openApiService) {
22         this.openApiService = requireNonNull(openApiService);
23     }
24
25     @Override
26     public Set<Object> getSingletons() {
27         return Set.of(openApiService, new JaxbContextResolver(), new JacksonJaxbJsonProvider());
28     }
29 }