Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-972

yanglib does not support RFC6020 media types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 3.0.9, 4.0.6, 5.0.4
    • 3.0.0, 4.0.0, 5.0.0, 3.0.8, 4.0.5, 5.0.3
    • netconf

      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.

            ivanhrasko Ivan Hrasko
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: