[NETCONF-972] yanglib does not support RFC6020 media types Created: 07/Mar/23 Updated: 21/Jun/23 Resolved: 09/Mar/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | 3.0.0, 4.0.0, 5.0.0, 3.0.8, 4.0.5, 5.0.3 |
| Fix Version/s: | 3.0.9, 4.0.6, 5.0.4 |
| Type: | Bug | Priority: | High |
| Reporter: | Robert Varga | Assignee: | Ivan Hrasko |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
YangLibService service defines the following:
/**
* Get module's source for each module from yang library.
* @param name Module's name
* @param revision Module's revision
* @return Module's source
*/
@GET
@Produces("text/plain")
@Path("/schemas/{modelName}/{revision:([0-9\\-]*)}")
String getSchema(@PathParam("modelName") String name, @PathParam("revision") String revision);
This is rather wrong: what we are serving is YANG files, which in turn means we should be producing application/yang. This constant is available as YangConstants.RFC6020_YANG_MEDIA_TYPE. Fix this up so we produce either, returning text/plain when not otherwise specified. |