<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-752] When saving over data which already exists the JSON response contains forward slash.</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-752</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I am raising this as a bug because the presence or (lack of) of &apos;/&apos; leads to inconsistencies  in describing the expected response.&lt;/p&gt;

&lt;p&gt;TEST ENV&lt;br/&gt;
org.opendaylight.controller.version = 0.1&lt;br/&gt;
org.opendaylight.controller.build.scm.version = 78fec1c1c5a3720bd48d1044703824626f08b5d9&lt;br/&gt;
org.opendaylight.controller.build.user = jenkins-controller&lt;br/&gt;
org.opendaylight.controller.build.workspace = **********&lt;br/&gt;
org.opendaylight.controller.build.timestamp = 1409283738738&lt;br/&gt;
org.opendaylight.controller.build.machine = **********&lt;/p&gt;

&lt;p&gt;I tried to save data  which already exists in datastore in JSON format to a location behind /config root. I then tried to invoke an error response by saving the same data again. No special config was used.&lt;/p&gt;

&lt;p&gt;Steps&lt;/p&gt;

&lt;p&gt;method is: post&lt;br/&gt;
uri is: /restconf/config/opendaylight-inventory:nodes&lt;br/&gt;
headers is: &lt;/p&gt;
{&apos;content-type&apos;: &apos;application/json&apos;, &apos;accept&apos;: &apos;application/json&apos;}
&lt;p&gt;data is: {&lt;br/&gt;
      &quot;opendaylight-inventory:node&quot;:[&lt;/p&gt;
        {
            &quot;id&quot;:&quot;id2&quot;
        }
&lt;p&gt;      ]        &lt;br/&gt;
    }&lt;br/&gt;
expected_status is: 204&lt;/p&gt;


&lt;p&gt;and then repeat&lt;/p&gt;

&lt;p&gt;method is: post&lt;br/&gt;
uri is: /restconf/config/opendaylight-inventory:nodes&lt;br/&gt;
headers is: &lt;/p&gt;
{&apos;content-type&apos;: &apos;application/json&apos;, &apos;accept&apos;: &apos;application/json&apos;}
&lt;p&gt;data is: {&lt;br/&gt;
      &quot;opendaylight-inventory:node&quot;:[&lt;/p&gt;
        {
            &quot;id&quot;:&quot;id2&quot;
        }
&lt;p&gt;      ]        &lt;br/&gt;
    }&lt;br/&gt;
expected_status is: 409&lt;br/&gt;
expected response is &lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
 &quot;errors&quot;: {&lt;br/&gt;
  &quot;error&quot;: [&lt;br/&gt;
   {&lt;br/&gt;
    &quot;error-message&quot;: &quot;Data already exists for path: (urn:opendaylight:inventory?revision=2013-08-19)nodes(urn:opendaylight:inventory?revision=2013-08-19)node[&lt;/p&gt;
{(urn:opendaylight:inventory?revision=2013-08-19)id=id2}
&lt;p&gt;]&quot;,&lt;br/&gt;
    &quot;error-tag&quot;: &quot;data-exists&quot;,&lt;br/&gt;
    &quot;error-type&quot;: &quot;protocol&quot;&lt;br/&gt;
   }&lt;br/&gt;
  ]&lt;br/&gt;
 }&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;ACTUAL RESPONSE&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;errors&quot;: {&lt;br/&gt;
        &quot;error&quot;: [&lt;br/&gt;
            {&lt;br/&gt;
                &quot;error-type&quot;: &quot;protocol&quot;,&lt;br/&gt;
                &quot;error-tag&quot;: &quot;data-exists&quot;,&lt;br/&gt;
                &quot;error-message&quot;: &quot;Data already exists for path: /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node[&lt;/p&gt;
{(urn:opendaylight:inventory?revision=2013-08-19)id=id2}
&lt;p&gt;]&quot;&lt;br/&gt;
            }&lt;br/&gt;
        ]&lt;br/&gt;
    }&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;NOTES&lt;br/&gt;
The path on  the &quot;error message&quot; key also looks wrong. nodes is duplicated.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25306">CONTROLLER-752</key>
            <summary>When saving over data which already exists the JSON response contains forward slash.</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Won&apos;t Do</resolution>
                                        <assignee username="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="ricjhill@gmail.com">RichardHill</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Sep 2014 19:33:05 +0000</created>
                <updated>Fri, 5 Sep 2014 07:29:42 +0000</updated>
                            <resolved>Fri, 5 Sep 2014 07:29:42 +0000</resolved>
                                    <version>Helium</version>
                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="49012" author="tony.tkacik@gmail.com" created="Fri, 5 Sep 2014 07:29:42 +0000"  >&lt;p&gt;Is there problem with forward slash? escaping is suggested only for Javascript,&lt;br/&gt;
not JSON.&lt;br/&gt;
The JSON RFC in Section 7 &lt;a href=&quot;http://tools.ietf.org/html/rfc7159#section-7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://tools.ietf.org/html/rfc7159#section-7&lt;/a&gt;&lt;br/&gt;
explicitly states characters which needs to be escaped and forward slash (solidus)&lt;br/&gt;
is not listed there.&lt;/p&gt;

&lt;p&gt;   The representation of strings is similar to conventions used in the C&lt;br/&gt;
   family of programming languages.  A string begins and ends with&lt;br/&gt;
   quotation marks.  All Unicode characters may be placed within the&lt;br/&gt;
   quotation marks, except for the characters that must be escaped:&lt;br/&gt;
   quotation mark, reverse solidus, and the control characters (U+0000&lt;br/&gt;
   through U+001F). &lt;/p&gt;


&lt;p&gt;Also path returned in error message represents internal format used in ODL not restconf and is for information purposes and may change, since its contents&lt;br/&gt;
is not formally defined or required by specification.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1661</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1661]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02mc7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>