<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Openapi-Generator built API Client not working for TagComparisonOperation in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Openapi-Generator-built-API-Client-not-working-for/m-p/109385#M493</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;We want to use the dynatrace configuration API in one of our projects and generated the client with the openapi-generator for java. Unfortunately for the Endpoint (POST&lt;A href="https://nwdyna01/e/b23df3f5-7024-4f3b-a773-cc4de9ac0ac0/rest-api-doc/index.jsp?urls.primaryName=Configuration%20API#/Service%20-%20Detection%20full%20web%20service/createRule_2"&gt;/service/detectionRules/FULL_WEB_SERVICE&lt;/A&gt; ) it came up with a non working client.&lt;/P&gt;&lt;P&gt;Problem seems to be that the discriminator name of the entity CompareOperation has the same name as the attribute type within the TagCompareOperation&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;"CompareOperation" : {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "type" : "object",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "required" : [ "type" ],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "&lt;STRONG&gt;discriminator" : "type"&lt;/STRONG&gt;,&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The generated client comes up with this so that the compareOperation has to "type" attributes.&lt;/P&gt;&lt;PRE&gt;compareOperations":[&lt;STRONG&gt;{"type":"TagCompareOperation"&lt;/STRONG&gt;,"compareKeyOnly":null,"tags":[{"context":"KUBERNETES","key":"eosapp","value":"dynatrace-0-1-0"},{"context":"KUBERNETES","key":"environment","value":"dev"},{"context":"KUBERNETES","key":"project","value":"core"}]&lt;STRONG&gt;,"type":"TAG"&lt;/STRONG&gt;}]}]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When I change the discriminator to baseType it works fine.&lt;/P&gt;&lt;P&gt;Is this a problem of the specification or a problem of openapi-generator?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Gerald&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 08:18:59 GMT</pubDate>
    <dc:creator>gerald_madlsper</dc:creator>
    <dc:date>2020-02-27T08:18:59Z</dc:date>
    <item>
      <title>Openapi-Generator built API Client not working for TagComparisonOperation</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Openapi-Generator-built-API-Client-not-working-for/m-p/109385#M493</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;We want to use the dynatrace configuration API in one of our projects and generated the client with the openapi-generator for java. Unfortunately for the Endpoint (POST&lt;A href="https://nwdyna01/e/b23df3f5-7024-4f3b-a773-cc4de9ac0ac0/rest-api-doc/index.jsp?urls.primaryName=Configuration%20API#/Service%20-%20Detection%20full%20web%20service/createRule_2"&gt;/service/detectionRules/FULL_WEB_SERVICE&lt;/A&gt; ) it came up with a non working client.&lt;/P&gt;&lt;P&gt;Problem seems to be that the discriminator name of the entity CompareOperation has the same name as the attribute type within the TagCompareOperation&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;"CompareOperation" : {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "type" : "object",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "required" : [ "type" ],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "&lt;STRONG&gt;discriminator" : "type"&lt;/STRONG&gt;,&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The generated client comes up with this so that the compareOperation has to "type" attributes.&lt;/P&gt;&lt;PRE&gt;compareOperations":[&lt;STRONG&gt;{"type":"TagCompareOperation"&lt;/STRONG&gt;,"compareKeyOnly":null,"tags":[{"context":"KUBERNETES","key":"eosapp","value":"dynatrace-0-1-0"},{"context":"KUBERNETES","key":"environment","value":"dev"},{"context":"KUBERNETES","key":"project","value":"core"}]&lt;STRONG&gt;,"type":"TAG"&lt;/STRONG&gt;}]}]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When I change the discriminator to baseType it works fine.&lt;/P&gt;&lt;P&gt;Is this a problem of the specification or a problem of openapi-generator?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Gerald&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 08:18:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Openapi-Generator-built-API-Client-not-working-for/m-p/109385#M493</guid>
      <dc:creator>gerald_madlsper</dc:creator>
      <dc:date>2020-02-27T08:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Openapi-Generator built API Client not working for TagComparisonOperation</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Openapi-Generator-built-API-Client-not-working-for/m-p/109386#M494</link>
      <description>&lt;P&gt;Hi Gerald, &lt;BR /&gt;&lt;BR /&gt;this looks like a problem in the generator code, there is nothing wrong in having same attribute names in a nested objects. Good that you found a reasonable workaround.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 10:11:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Openapi-Generator-built-API-Client-not-working-for/m-p/109386#M494</guid>
      <dc:creator>florian_AIgner</dc:creator>
      <dc:date>2020-07-06T10:11:00Z</dc:date>
    </item>
  </channel>
</rss>

