<?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: Ofer Lis</title>
    <description>The latest articles on DEV Community by Ofer Lis (@oferlis).</description>
    <link>https://dev.to/oferlis</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%2F1116752%2F20bdf3d1-e1a6-40ae-98aa-8030cfaebdae.png</url>
      <title>DEV Community: Ofer Lis</title>
      <link>https://dev.to/oferlis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oferlis"/>
    <language>en</language>
    <item>
      <title>History lesson: what are class components in React?</title>
      <dc:creator>Ofer Lis</dc:creator>
      <pubDate>Wed, 27 Sep 2023 14:48:56 +0000</pubDate>
      <link>https://dev.to/oferlis/history-lesson-what-are-class-components-4pga</link>
      <guid>https://dev.to/oferlis/history-lesson-what-are-class-components-4pga</guid>
      <description>&lt;h2&gt;
  
  
  Class Components: The Old Guard
&lt;/h2&gt;

&lt;p&gt;As young developers using and learning React for the last few years, we are mostly familiar with functional components. &lt;/p&gt;

&lt;p&gt;But class components are a topic that is often asked about in job interviews. Let me take you on a brief history lesson.&lt;/p&gt;

&lt;p&gt;In the realm of React development, class components were once the undisputed champions. They were the go-to choice for building reusable and dynamic user interface elements. Why were they so popular, and why did developers rely on them for so long?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Class components&lt;/strong&gt;, also known as stateful components, offered a structured way to create and manage complex UI elements. Developers could define a JavaScript class that extended &lt;code&gt;React.Component&lt;/code&gt;, and within that class, they could encapsulate the component's logic, state, and lifecycle methods. Each class had to have a render method to show that returned the JSX. This approach provided a clear and organized structure for building dynamic web applications.&lt;/p&gt;

&lt;p&gt;Here's a quick overview of the defining characteristics of class components:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Lifecycle Methods:
&lt;/h3&gt;

&lt;p&gt;Class components came equipped with a range of lifecycle methods such as &lt;code&gt;componentDidMount&lt;/code&gt;, &lt;code&gt;componentDidUpdate&lt;/code&gt;, and &lt;code&gt;componentWillUnmount&lt;/code&gt;. These methods allowed developers to respond to component events and manage side effects.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. State Management:
&lt;/h3&gt;

&lt;p&gt;Class components had a built-in state management system using &lt;code&gt;this.state&lt;/code&gt;, enabling them to hold and update data that influenced the component's behavior and rendering.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Richer Feature Set:
&lt;/h3&gt;

&lt;p&gt;In the earlier days of React, class components offered more advanced features for handling complex scenarios. They were essential for managing local component state, making network requests, and handling form submissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Component Hierarchy:
&lt;/h3&gt;

&lt;p&gt;Class components were instrumental in organizing component hierarchies in larger applications. They allowed developers to create a clear structure for their code, making it easier to reason about and maintain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;ClassComponent&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Count: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;componentDidUpdate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Count: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;})}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nx"&gt;Increment&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ClassComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Rise of Function Components
&lt;/h2&gt;

&lt;p&gt;Fast forward to &lt;a href="https://legacy.reactjs.org/blog/2019/02/06/react-v16.8.0.html"&gt;React 16.8&lt;/a&gt;, and a seismic shift occurred in the React ecosystem with the introduction of &lt;strong&gt;functional components&lt;/strong&gt;. Functional components, often referred to as stateless or presentational components, were initially seen as lightweight and simplistic alternatives to class components. However, they've since become the new standard for React development. But why?&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Simplicity:
&lt;/h3&gt;

&lt;p&gt;Functional components, as the name suggests, are based on JavaScript functions. They are inherently concise and straightforward. This simplicity makes them easier to write, read, and maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. No More Classes:
&lt;/h3&gt;

&lt;p&gt;Gone are the days of defining classes and constructors. Functional components allow you to define UI elements as pure functions that take in &lt;code&gt;props&lt;/code&gt; and return JSX. This reduction in boilerplate code is a breath of fresh air for developers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;FunctionalComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. The Power of Hooks:
&lt;/h3&gt;

&lt;p&gt;React's development team introduced hooks like &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; with functional components. These hooks revolutionized the way we handle state and side effects, bringing them on par with what class components offered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;FunctionalComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Count: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Increment&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Community Adoption:
&lt;/h3&gt;

&lt;p&gt;The React community overwhelmingly embraced functional components and hooks, leading to a wealth of resources, libraries, and best practices. This collective shift in focus away from class components has accelerated their decline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, class components, once the stalwarts of React development, have gradually taken a back seat to functional components. The simplicity, reduced boilerplate code, and the introduction of hooks have made functional components the preferred choice for modern React applications. As a developer, understanding both class and functional components will enable you to navigate legacy codebases while harnessing the power and elegance of functional components in your new projects.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ChatGPT: how I used it to convert HTTP requests to OpenAPI document</title>
      <dc:creator>Ofer Lis</dc:creator>
      <pubDate>Mon, 10 Jul 2023 13:12:45 +0000</pubDate>
      <link>https://dev.to/oferlis/chatgpt-how-i-used-it-to-convert-http-requests-to-openapi-document-1n4m</link>
      <guid>https://dev.to/oferlis/chatgpt-how-i-used-it-to-convert-http-requests-to-openapi-document-1n4m</guid>
      <description>&lt;p&gt;Hi everyone! 👋&lt;br&gt;
As a junior software developer, I try to learn as much as I can about new technologies and how to enhance my skills.&lt;br&gt;
Contributing to open-source projects is one of the best ways to do that.&lt;/p&gt;

&lt;p&gt;The following article shows one of my recent contributions to &lt;br&gt;
&lt;a href="https://github.com/idodav/sharkio"&gt;Sharkio&lt;/a&gt;, using ChatGPT.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Sharkio? 🦈
&lt;/h2&gt;

&lt;p&gt;Sharkio is a developer tool for API developers. It makes the developer's work easier by aggregating and presenting the requests sent to our services in a clean and clear UI. It also allows the mocking of HTTP requests to make it easier for backend and frontend developers to work efficiently together. &lt;br&gt;
Sharkio is an &lt;strong&gt;open-source project&lt;/strong&gt; written in TS with a growing community and a long list of features requested by its developers and users.&lt;/p&gt;

&lt;h2&gt;
  
  
  My contribution - HTTP requests to OpenAPI
&lt;/h2&gt;

&lt;p&gt;My contribution to Sharkio focused on a highly requested feature: auto-generation of standardized &lt;a href="https://swagger.io/"&gt;OpenAPI&lt;/a&gt; documentation using recorded HTTP requests. This feature addresses the need for consistent and comprehensive documentation in API development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use ChatGPT?
&lt;/h2&gt;

&lt;p&gt;Using ChatGPT in my development process was a game-changer. It reduced the time spent on formatting the OpenAPI document structure, saving me hours of research. This freed up my focus to prioritize coding and implementation, leading to greater efficiency and productivity in my work.&lt;/p&gt;

&lt;p&gt;My prompt: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dS3hE3Im--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99vnvbzt5qfe28l5b44e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dS3hE3Im--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99vnvbzt5qfe28l5b44e.png" alt="ChatGPT prompt" width="722" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and the chat's output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FG15seN4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqmbgxir3k9zlsyzltp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FG15seN4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqmbgxir3k9zlsyzltp7.png" alt="ChatGPT output" width="800" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few prompts later, I end up with 3 interface to represent the OpenAPI document:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wetUGaMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmu4u9fixcrlmhxjpd8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wetUGaMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmu4u9fixcrlmhxjpd8i.png" alt="openAPI interfaces" width="800" height="1478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I modified the code to match the code structure, extracted interfaces and added a form to get the name and version type in the UI.&lt;/p&gt;

&lt;p&gt;You could see the code [in the PR].(&lt;a href="https://github.com/idodav/sharkio/pull/95"&gt;https://github.com/idodav/sharkio/pull/95&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The outcome was a form and a page to create an OpenAPI document using HTTP requests:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hv77bd4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4irg9wi8bgy1p6mblf5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hv77bd4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4irg9wi8bgy1p6mblf5f.png" alt="openAPI generation UI" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Join us 👨‍💻 👩‍💻
&lt;/h2&gt;

&lt;p&gt;If you're interested in learning more about Sharkio, I invite you to visit the &lt;a href="https://github.com/idodav/sharkio"&gt;repository&lt;/a&gt; and explore the project. Feel free to use the tool, provide feedback, and join the growing community of contributors. We welcome developers of all levels of expertise to join us on this exciting journey.&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>opensource</category>
      <category>ts</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
