Sean Condon | e4042d3 | 2018-05-21 17:53:22 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.onosproject.restconf.api; |
| 17 | |
| 18 | import javax.ws.rs.core.MediaType; |
| 19 | |
| 20 | /* |
| 21 | * Extension of the REST MediaType with 2 new types from the RESTCONF standard RFC 8040. |
| 22 | * |
| 23 | * Currently (1.14) the XML Media Type is not supported by the RESTCONF server in ONOS |
| 24 | */ |
| 25 | public class MediaTypeRestconf extends MediaType { |
| 26 | public static final String APPLICATION_YANG_DATA_XML = "application/yang-data+xml"; |
| 27 | public static final MediaType APPLICATION_YANG_DATA_XML_TYPE = new MediaType("application", "yang-data+xml"); |
| 28 | public static final String APPLICATION_YANG_DATA_JSON = "application/yang-data+json"; |
| 29 | public static final MediaType APPLICATION_YANG_DATA_JSON_TYPE = new MediaType("application", "yang-data+json"); |
| 30 | |
| 31 | } |