<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:32 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-1042] OpenAPI: Missing validation badge</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1042</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;We are missing validation badge. The most probable reason for this are our changes in &lt;tt&gt;swagger-initializer.js&lt;/tt&gt;. Maybe our change of:&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;
  window.ui = SwaggerUIBundle({
    url: &lt;span class=&quot;code-quote&quot;&gt;&quot;https:&lt;span class=&quot;code-comment&quot;&gt;//petstore.swagger.io/v2/swagger.json&quot;&lt;/span&gt;, &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So now validation logic has no info which URL to validate. We need to set it after each selection of source (controller/device).&lt;/p&gt;

&lt;p&gt;As shown on the picture, validation is working when we revert back to original swagger UI:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;18812_thumb&quot; href=&quot;https://jira.opendaylight.org/secure/attachment/18812/18812_validator.png&quot; title=&quot;validator.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;18812&quot; file-preview-title=&quot;validator.png&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/thumbnail/18812/_thumb_18812.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="36953">NETCONF-1042</key>
            <summary>OpenAPI: Missing validation badge</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="ojo">Oleksandr Zharov</assignee>
                                    <reporter username="ivanhrasko">Ivan Hrasko</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Fri, 26 May 2023 11:13:14 +0000</created>
                <updated>Wed, 31 May 2023 10:55:57 +0000</updated>
                            <resolved>Wed, 31 May 2023 10:48:30 +0000</resolved>
                                                                    <component>restconf-openapi</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="72223" author="JIRAUSER14403" created="Tue, 30 May 2023 15:27:57 +0000"  >&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;So essentially - validation will work if link is accessible by validator. That&apos;s why it absent on localhost and works on cluster. It has nothing to do with our UI modifications of swagger. I also did experiment and added petstore.json link to our UI and it showed valid badge on localhost.&lt;/p&gt;

&lt;p&gt;Also if we are using static IP (clustering for example) - it also trying validate schema:&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;18816_thumb&quot; href=&quot;https://jira.opendaylight.org/secure/attachment/18816/18816_static-ip-schema.png&quot; title=&quot;static-ip-schema.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;18816&quot; file-preview-title=&quot;static-ip-schema.png&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/thumbnail/18816/_thumb_18816.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;All this information is described also here: &lt;a href=&quot;https://github.com/swagger-api/validator-badge&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/swagger-api/validator-badge&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;From that point I see two possible ways for this task: &lt;br/&gt;
1. Close it. This is intentional behavior and not a bug - validation works just not for localhost. &lt;br/&gt;
2. In case we need validator to work on localhost: Expand task or close it and create new one with purpose of installing validator locally and documenting how to work with it.&lt;/p&gt;</comment>
                            <comment id="72228" author="ivanhrasko" created="Wed, 31 May 2023 10:48:10 +0000"  >&lt;p&gt;No issue. Closed.&lt;/p&gt;</comment>
                            <comment id="72229" author="ivanhrasko" created="Wed, 31 May 2023 10:55:57 +0000"  >&lt;p&gt;In the future, maybe, we can use &lt;a href=&quot;https://validator.swagger.io/#/Validator/validateByContent&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://validator.swagger.io/#/Validator/validateByContent&lt;/a&gt; to get badge by uploading the whole JSON definition.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="18816" name="static-ip-schema.png" size="125554" author="ojo" created="Tue, 30 May 2023 15:22:54 +0000"/>
                            <attachment id="18812" name="validator.png" size="53544" author="ivanhrasko" created="Fri, 26 May 2023 11:15:11 +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|i045a7:</customfieldvalue>

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