<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:34 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-1057] OpenApi: Eliminate TOP schemas</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1057</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Currently, we generate for each container element (container, list) schema and, additionally, schema with _TOP prefix. _TOP prefix is used for PUT (JSON), PATCH (JSON) and GET operations.&lt;/p&gt;

&lt;p&gt;Assuming that all operations are under &lt;b&gt;path&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;We can change our logic in the following way:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;For each container create its path.&lt;/li&gt;
	&lt;li&gt;For each container create its schema - only one.&lt;/li&gt;
	&lt;li&gt;Link container&apos;s path with schema for PUT (JSON), PATCH (JSON) and GET operations.&lt;/li&gt;
	&lt;li&gt;Link container&apos;s &lt;b&gt;parent&lt;/b&gt; path with schema for POST, PUT (XML) and PATCH (XML) operations.&lt;/li&gt;
	&lt;li&gt;Continue.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="37009">NETCONF-1057</key>
            <summary>OpenApi: Eliminate TOP schemas</summary>
                <type id="10101" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10318&amp;avatarType=issuetype">Task</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="ivanhrasko">Ivan Hrasko</assignee>
                                    <reporter username="ivanhrasko">Ivan Hrasko</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Wed, 14 Jun 2023 14:43:38 +0000</created>
                <updated>Thu, 17 Aug 2023 14:38:27 +0000</updated>
                            <resolved>Thu, 17 Aug 2023 14:38:27 +0000</resolved>
                                                    <fixVersion>7.0.0</fixVersion>
                                    <component>restconf-openapi</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="72303" author="ivanhrasko" created="Fri, 16 Jun 2023 11:46:35 +0000"  >&lt;p&gt;In &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-1059&quot; title=&quot;OpenApi: Wrong XML GET example&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-1059&quot;&gt;&lt;del&gt;NETCONF-1059&lt;/del&gt;&lt;/a&gt; we can see that using _TOP schema for GET in XML is not correct.&lt;/p&gt;</comment>
                            <comment id="72429" author="ivanhrasko" created="Tue, 1 Aug 2023 14:44:20 +0000"  >&lt;p&gt;We cannot implement logic as proposed above because of the following reasons:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;ODL requires JSON payload be be enclosed by {} and element name as required by &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc8040#section-4.5.&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://datatracker.ietf.org/doc/html/rfc8040#section-4.5.&lt;/a&gt; That is the reason why we have created TOP schemas.&lt;/li&gt;
	&lt;li&gt;In fact, the schema created for container will never be show as required in #1 without creating additional schema which is level up.&lt;/li&gt;
	&lt;li&gt;We cannot use parent&apos;s schema for this purpose because it contains data for other children as well.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;But we can remove TOP schemas for lists and container and apply their logic directly in responses. This way we will get more cleaner and user friendly schemas listing at the bottom of generated OpenApi documentation.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="72430" author="ivanhrasko" created="Tue, 1 Aug 2023 14:46:10 +0000"  >&lt;p&gt;Please see proposed OpenApi docs after modifications: &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/attachment/19006/19006_expected-TOP-removal-for-containers.json&quot; title=&quot;expected-TOP-removal-for-containers.json attached to NETCONF-1057&quot;&gt;expected-TOP-removal-for-containers.json&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.opendaylight.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/attachment/19007/19007_expected-TOP-removal-for-lists.json&quot; title=&quot;expected-TOP-removal-for-lists.json attached to NETCONF-1057&quot;&gt;expected-TOP-removal-for-lists.json&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.opendaylight.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;. You can see the diffs against &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/attachment/19008/19008_original.json&quot; title=&quot;original.json attached to NETCONF-1057&quot;&gt;original.json&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.opendaylight.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;to get idea what is going on.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="37041">NETCONF-1077</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="37005">NETCONF-1054</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="37012">NETCONF-1059</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36515">NETCONF-938</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="19006" name="expected-TOP-removal-for-containers.json" size="27486" author="ivanhrasko" created="Tue, 1 Aug 2023 14:45:53 +0000"/>
                            <attachment id="19007" name="expected-TOP-removal-for-lists.json" size="27536" author="ivanhrasko" created="Tue, 1 Aug 2023 14:45:53 +0000"/>
                            <attachment id="19008" name="original.json" size="27637" author="ivanhrasko" created="Tue, 1 Aug 2023 14:46:48 +0000"/>
                    </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|i045h3:</customfieldvalue>

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