2e0d6f9c72be8d662ec2da1d4459867c8d0f1263
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / restconf / rest / api / services / schema / 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.rest.api.services.schema;
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.netconf.md.sal.rest.schema.SchemaExportContext;
15 import org.opendaylight.restconf.Draft11;
16 import org.opendaylight.restconf.utils.RestconfConstants;
17
18 /**
19  * Retrieval of the YANG modules which server supports.
20  *
21  */
22 @Path("/")
23 public interface RestconfSchemaService {
24
25     /**
26      * Get schema of specific module.
27      *
28      * @param identifier
29      *            - path parameter
30      * @return {@link SchemaExportContext}
31      */
32     @GET
33     @Produces({ Draft11.MediaTypes.YANG, Draft11.MediaTypes.YIN + RestconfConstants.XML })
34     @Path("data/ietf-yang-library:modules/module/{identifier:.+}/schema")
35     SchemaExportContext getSchema(@PathParam("identifier") String identifier);
36 }