<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: BernoItaliano</title>
    <description>The latest articles on DEV Community by BernoItaliano (@bernoitaliano).</description>
    <link>https://dev.to/bernoitaliano</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F321398%2F2ac8ba12-917b-4cd7-b20d-6454eb0e7ec7.png</url>
      <title>DEV Community: BernoItaliano</title>
      <link>https://dev.to/bernoitaliano</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bernoitaliano"/>
    <language>en</language>
    <item>
      <title>Error versioning in NetCore</title>
      <dc:creator>BernoItaliano</dc:creator>
      <pubDate>Tue, 21 Jan 2020 14:38:45 +0000</pubDate>
      <link>https://dev.to/bernoitaliano/error-versioning-in-netcore-17h8</link>
      <guid>https://dev.to/bernoitaliano/error-versioning-in-netcore-17h8</guid>
      <description>&lt;p&gt;good morning&lt;/p&gt;

&lt;p&gt;I have my API and I want to make two versions of it, reading this excellent post (&lt;a href="https://dev.to/htissink/versioning-asp-net-core-apis-with-swashbuckle-making-space-potatoes-vxxx-3po7"&gt;https://dev.to/htissink/versioning-asp-net-core-apis-with-swashbuckle-making-space-potatoes-vxxx-3po7&lt;/a&gt;) .&lt;br&gt;
I follow every step to the letter, and I have the error I attached ...&lt;/p&gt;

&lt;p&gt;*** ArgumentException: An item with the same key has already been added. Key: v1&lt;br&gt;
 c.SwaggerDoc("v1", new Info { Title = "API 1 HILP", Version = "v1" }); ***&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        services.AddSwaggerGen(c =&amp;gt;
        {
            c.SwaggerDoc("v1", new Info { Title = "API 1 HILP", Version = "v1" });
            c.SwaggerDoc("v2", new Info { Title = "API 2 *PRUEBA* HILP", Version = "v2" });
           // c.ExampleFilters();


            // Set the comments path for the Swagger JSON and UI.
            var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
            var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
            c.IncludeXmlComments(xmlPath);
            c.CustomSchemaIds(x =&amp;gt; x.FullName);
        });
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;From what I understand, I am using the same Key twice but I cannot find this error.&lt;/p&gt;

&lt;p&gt;I appreciate every contribution and help!&lt;/p&gt;

&lt;p&gt;Regards!! &lt;/p&gt;

</description>
      <category>errors</category>
      <category>key</category>
      <category>netcore</category>
      <category>version</category>
    </item>
  </channel>
</rss>
