<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16: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>[NETCONF-1145] Remove identity from OpenAPI Schemas</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1145</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Currently, each identity in the Yang model is being transferred to an OpenAPI Schema object, which is unnecessary since they are only used as strings.&lt;br/&gt;
For example:&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;
identity toast-type {
  description
      &quot;Base &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; all bread types supported by the toaster.
       New bread types not listed here nay be added in the
       &lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt;.&quot;;
}

identity white-bread {
  base toast:toast-type;
  description &lt;span class=&quot;code-quote&quot;&gt;&quot;White bread.&quot;&lt;/span&gt;;
} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;is transferred to Schema object as:&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;
&lt;span class=&quot;code-quote&quot;&gt;&quot;toast-type&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt;&quot;&lt;/span&gt;: [
       &lt;span class=&quot;code-quote&quot;&gt;&quot;toast-type&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;wonder-bread&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;frozen-bagel&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;frozen-waffle&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;white-bread&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;wheat-bread&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;hash-brown&quot;&lt;/span&gt;
    ],
    &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Base &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; all bread types supported by the toaster.\nNew bread types not listed here nay be added in the\nfuture.&quot;&lt;/span&gt;,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;toast-type&quot;&lt;/span&gt;,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
},
&lt;span class=&quot;code-quote&quot;&gt;&quot;white-bread&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt;&quot;&lt;/span&gt;: [
       &lt;span class=&quot;code-quote&quot;&gt;&quot;white-bread&quot;&lt;/span&gt;
    ],
    &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;White bread.&quot;&lt;/span&gt;,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;white-bread&quot;&lt;/span&gt;,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then, they are utilized as references for other objects.&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;
&lt;span class=&quot;code-quote&quot;&gt;&quot;toaster_make-toast_input&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;properties&quot;&lt;/span&gt;: {
       &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterDoneness&quot;&lt;/span&gt;: {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;This variable controls how well-done is the\n      ensuing toast. It should be on a scale of 1 to 10.\n      Toast made at 10 generally is considered unfit\n      &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; human consumption; toast made at 1 is warmed\n      lightly.&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;format&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;int64&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt;: 5,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;example&quot;&lt;/span&gt;: 1,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
       },
       &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterToastType&quot;&lt;/span&gt;: {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;$ref&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;#/components/schemas/toast-type&quot;&lt;/span&gt;
       }
    }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;To result in an example input that looks like this:&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;
{
  &lt;span class=&quot;code-quote&quot;&gt;&quot;input&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterDoneness&quot;&lt;/span&gt;: 1,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterToastType&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;toast-type&quot;&lt;/span&gt;
  }
} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

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

&lt;p&gt;A more effective solution would involve using only the string value instead of a reference.&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;
&lt;span class=&quot;code-quote&quot;&gt;&quot;toaster_make-toast_input&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;properties&quot;&lt;/span&gt;: {
       &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterDoneness&quot;&lt;/span&gt;: {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;This variable controls how well-done is the\n      ensuing toast. It should be on a scale of 1 to 10.\n      Toast made at 10 generally is considered unfit\n      &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; human consumption; toast made at 1 is warmed\n      lightly.&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;format&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;int64&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt;: 5,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;example&quot;&lt;/span&gt;: 1,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
       },
       &lt;span class=&quot;code-quote&quot;&gt;&quot;toasterToastType&quot;&lt;/span&gt;: {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;This variable informs the toaster of the type of\n                   material that is being toasted. The toaster\n                   uses &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; information, combined with\n                   toasterDoneness, to compute &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; how\n                   &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; the material must be toasted to achieve\n                   the required doneness.&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;wheat-bread&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;example&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;toast-type&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
       }
    }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This solution also addresses the issue of not using default values for identityref objects and addresses the problem of missing descriptions.&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;
  leaf toasterToastType {
    type identityref {
      base toast:toast-type;
    }
    &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;wheat-bread&apos;&lt;/span&gt;;
    description
      &quot;This variable informs the toaster of the type of
             material that is being toasted. The toaster
             uses &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; information, combined with
             toasterDoneness, to compute &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; how
             &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; the material must be toasted to achieve
             the required doneness.&quot;;
  }
} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;IMHO, this method should be updated:&lt;br/&gt;
DefinitionGenerator#processIdentityRefType&lt;br/&gt;
and this should be removed&lt;/p&gt;

&lt;p&gt;DefinitionGenerator#processIdentities&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="37307">NETCONF-1145</key>
            <summary>Remove identity from OpenAPI Schemas</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="SamoSchneider">Samuel Schneider</assignee>
                                    <reporter username="PeterSuna">Peter Suna</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Wed, 30 Aug 2023 14:36:51 +0000</created>
                <updated>Wed, 18 Oct 2023 08:15:37 +0000</updated>
                            <resolved>Wed, 18 Oct 2023 08:15:37 +0000</resolved>
                                                    <fixVersion>7.0.0</fixVersion>
                                    <component>restconf-openapi</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="72605" author="JIRAUSER14508" created="Mon, 18 Sep 2023 13:08:27 +0000"  >&lt;p&gt;For reference this is how the schema toaster2_make-toast_input looks now:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/attachment/19200/19200_old_schema.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;and this is how it looks after proposed patch:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/attachment/19231/19231_new_schema_enum.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="19201" name="new_schema.png" size="54905" author="SamoSchneider" created="Mon, 18 Sep 2023 13:08:17 +0000"/>
                            <attachment id="19231" name="new_schema_enum.png" size="63707" author="SamoSchneider" created="Tue, 17 Oct 2023 13:25:24 +0000"/>
                            <attachment id="19200" name="old_schema.png" size="53711" author="SamoSchneider" created="Mon, 18 Sep 2023 13:07:17 +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|i046db:</customfieldvalue>

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