Use YangConstants.RFC6020_YANG_MEDIA_TYPE
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / services / simple / api / RestconfSchemaService.java
1 /*
2  * Copyright (c) 2016 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.restconf.nb.rfc8040.services.simple.api;
9
10 import javax.ws.rs.GET;
11 import javax.ws.rs.Path;
12 import javax.ws.rs.PathParam;
13 import javax.ws.rs.Produces;
14 import org.opendaylight.restconf.common.schema.SchemaExportContext;
15 import org.opendaylight.restconf.nb.rfc8040.Rfc8040;
16 import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants;
17 import org.opendaylight.yangtools.yang.common.YangConstants;
18
19 /**
20  * Retrieval of the YANG modules which server supports.
21  *
22  */
23 @Path("/")
24 public interface RestconfSchemaService extends UpdateHandlers {
25
26     /**
27      * Get schema of specific module.
28      *
29      * @param identifier
30      *             path parameter
31      * @return {@link SchemaExportContext}
32      */
33     @GET
34     @Produces({ Rfc8040.MediaTypes.YIN + RestconfConstants.XML, YangConstants.RFC6020_YANG_MEDIA_TYPE })
35     @Path("modules/{identifier:.+}")
36     SchemaExportContext getSchema(@PathParam("identifier") String identifier);
37 }