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

yanglib does not support RFC6020 media types

    XMLWordPrintable

Details

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

    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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: