<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:23 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>[NETCONF-976] The required fields are created, but they are not populate in the Swagger API</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-976</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;During the processing of container nodes in the DefinitionGenerator, required fields are not being populated. While an array for required fields is created in this method, it is not being passed to the processChildNode method.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; ArrayNode required = JsonNodeFactory.instance.arrayNode();
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; DataSchemaNode node : nodes) {
&#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!isConfig || node.isConfiguration()) {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; processChildNode(node, parentName, definitions, definitionNames, isConfig, stack, properties,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; oaversion);
&#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; parentNode.set(PROPERTIES_KEY, properties);
&#160; &#160; &#160; &#160; setRequiredIfNotEmpty(parentNode, required);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/opendaylight/netconf/blob/master/restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/DefinitionGenerator.java#L476&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/opendaylight/netconf/blob/master/restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/DefinitionGenerator.java#L476&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Instead of using the `ArrayNode required` inside the `processChildNode` method, a new ArrayNode is being used to populate the required fields, which is then never stored.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (node &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; LeafSchemaNode leaf) {
&#160; &#160; &#160; &#160; &#160; &#160; processLeafNode(leaf, name, properties, JsonNodeFactory.instance.arrayNode(), stack, definitions,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; definitionNames, oaversion);
&#160; &#160; &#160; &#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (node &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; AnyxmlSchemaNode anyxml) {
&#160; &#160; &#160; &#160; &#160; &#160; processAnyXMLNode(anyxml, name, properties, JsonNodeFactory.instance.arrayNode());
&#160; &#160; &#160; &#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (node &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; AnydataSchemaNode anydata) {
&#160; &#160; &#160; &#160; &#160; &#160; processAnydataNode(anydata, name, properties, JsonNodeFactory.instance.arrayNode());
&#160; &#160; &#160; &#160; }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;https://github.com/opendaylight/netconf/blob/master/restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/DefinitionGenerator.java#L507&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/opendaylight/netconf/blob/master/restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/DefinitionGenerator.java#L507&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="36737">NETCONF-976</key>
            <summary>The required fields are created, but they are not populate in the Swagger API</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="10000">Done</resolution>
                                        <assignee username="PeterSuna">Peter Suna</assignee>
                                    <reporter username="PeterSuna">Peter Suna</reporter>
                        <labels>
                            <label>pt</label>
                            <label>regression</label>
                    </labels>
                <created>Wed, 15 Mar 2023 10:39:58 +0000</created>
                <updated>Fri, 14 Jul 2023 14:42:14 +0000</updated>
                            <resolved>Fri, 14 Jul 2023 14:42:14 +0000</resolved>
                                    <version>5.0.0</version>
                    <version>4.0.3</version>
                                    <fixVersion>6.0.0</fixVersion>
                    <fixVersion>5.0.7</fixVersion>
                    <fixVersion>4.0.9</fixVersion>
                                    <component>restconf-openapi</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="72055" author="ivanhrasko" created="Wed, 15 Mar 2023 11:33:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7950#page-14&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.rfc-editor.org/rfc/rfc7950#page-14&lt;/a&gt; says that &lt;b&gt;mandatory&lt;/b&gt; attribute can be used with: leaf, choice, anydata, anyxml, list (under some conditions), leaf-list (under some conditions) and container (under some conditions).&lt;/p&gt;</comment>
                            <comment id="72056" author="ivanhrasko" created="Wed, 15 Mar 2023 12:00:15 +0000"  >&lt;p&gt;The &lt;b&gt;mandatory&lt;/b&gt; attribute is no more written since fix of &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-883&quot; title=&quot;Fail to generate API Doc&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-883&quot;&gt;&lt;del&gt;NETCONF-883&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="72057" author="ivanhrasko" created="Wed, 15 Mar 2023 12:01:09 +0000"  >&lt;p&gt;In addition, we are missing implementation of logic for &lt;b&gt;list&lt;/b&gt;s, &lt;b&gt;leaf-list&lt;/b&gt;s and &lt;b&gt;container&lt;/b&gt;s.&lt;/p&gt;</comment>
                            <comment id="72321" author="ivanhrasko" created="Tue, 27 Jun 2023 10:52:48 +0000"  >&lt;p&gt;Unfortunately, branches 4.0.x and 5.0.x don&apos;t contain &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/netconf/+/105042.&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/netconf/+/105042.&lt;/a&gt; Thus we have to add mandatory logic into &lt;b&gt;_xml&lt;/b&gt; and &lt;b&gt;_post&lt;/b&gt; schemas to make fix complete on those branches.&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i044j3:</customfieldvalue>

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