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.
- blocks
-
NETCONF-973 Default application/yang in yanglib
- Resolved
-
NETCONF-974 Support YIN sources in yanglib
- Confirmed
- relates to
-
NETCONF-968 YangLib: reduntant '/' for models without revision
- Resolved